📄 temp.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form frmTemp
BackColor = &H80000009&
BorderStyle = 0 'None
Caption = "地址簿"
ClientHeight = 7200
ClientLeft = 0
ClientTop = 0
ClientWidth = 9450
LinkTopic = "Form1"
ScaleHeight = 7200
ScaleWidth = 9450
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton cmdExit
Caption = "退出"
Height = 495
Left = 120
TabIndex = 11
Top = 6000
Width = 1215
End
Begin VB.CommandButton cmdSend
Caption = "发送"
Height = 495
Left = 120
TabIndex = 10
Top = 5400
Width = 1215
End
Begin VB.CommandButton Command8
Caption = "删除联系人"
Height = 375
Left = 7920
TabIndex = 9
Top = 6000
Width = 1095
End
Begin VB.CommandButton cmdEdit
Caption = "编辑联系人"
Enabled = 0 'False
Height = 375
Left = 3000
TabIndex = 8
Top = 6000
Width = 1095
End
Begin VB.CommandButton cmdAdd
Caption = "新建联系人"
Height = 375
Left = 1800
TabIndex = 7
Top = 6000
Width = 1095
End
Begin VB.CommandButton cmdMain
Caption = "首页"
Height = 495
Left = 120
TabIndex = 6
Top = 1800
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "设备管理"
Height = 495
Left = 120
TabIndex = 5
Top = 2400
Width = 1215
End
Begin VB.CommandButton cmdContent
Caption = "发送内容"
Height = 495
Left = 120
TabIndex = 4
Top = 3000
Width = 1215
End
Begin VB.CommandButton Command4
Caption = "发送列表"
Height = 495
Left = 120
TabIndex = 3
Top = 3600
Width = 1215
End
Begin VB.CommandButton Command5
Caption = "发送记录"
Height = 495
Left = 120
TabIndex = 2
Top = 4200
Width = 1215
End
Begin VB.CommandButton cmdBook
Caption = "地址簿"
Height = 495
Left = 120
TabIndex = 1
Top = 4800
Width = 1215
End
Begin MSFlexGridLib.MSFlexGrid Usergrid
Height = 3735
Left = 1800
TabIndex = 0
Top = 2160
Width = 7215
_ExtentX = 12726
_ExtentY = 6588
_Version = 393216
Rows = 10
Cols = 4
FixedCols = 0
ForeColor = 8421504
BackColorFixed = 10649190
ForeColorFixed = 16777215
ForeColorSel = 16777215
BackColorBkg = 16777215
GridColor = 10649190
GridColorFixed = 4210752
FocusRect = 0
SelectionMode = 1
Appearance = 0
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Label Label11
BackColor = &H00A27E66&
Caption = "X"
ForeColor = &H00FFFFFF&
Height = 255
Left = 8760
TabIndex = 16
Top = 120
Width = 135
End
Begin VB.Label Label10
BackColor = &H00A27E66&
Height = 255
Left = 8520
TabIndex = 15
Top = 120
Width = 495
End
Begin VB.Label Label13
Appearance = 0 'Flat
BackColor = &H00A27E66&
Caption = " newking@online.sh.cn"
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 255
Left = 7440
TabIndex = 14
Top = 6840
Width = 1695
End
Begin VB.Line Line16
X1 = 5640
X2 = 6240
Y1 = 840
Y2 = 840
End
Begin VB.Line Line15
X1 = 4440
X2 = 5160
Y1 = 840
Y2 = 840
End
Begin VB.Line Line14
X1 = 3120
X2 = 4080
Y1 = 840
Y2 = 840
End
Begin VB.Line Line13
X1 = 1560
X2 = 2640
Y1 = 840
Y2 = 840
End
Begin VB.Label Label12
BackColor = &H00A27E66&
Caption = " v1.0 版 "
ForeColor = &H8000000E&
Height = 255
Left = 360
TabIndex = 13
Top = 6840
Width = 735
End
Begin VB.Line Line17
BorderColor = &H80000005&
X1 = 120
X2 = 9360
Y1 = 6900
Y2 = 6900
End
Begin VB.Line Line18
BorderColor = &H80000005&
X1 = 120
X2 = 9360
Y1 = 7020
Y2 = 7020
End
Begin VB.Line Line19
BorderColor = &H80000005&
X1 = 120
X2 = 9360
Y1 = 6840
Y2 = 6840
End
Begin VB.Line Line20
BorderColor = &H80000005&
X1 = 120
X2 = 9360
Y1 = 6960
Y2 = 6960
End
Begin VB.Shape Shape3
BorderStyle = 0 'Transparent
FillColor = &H00A27E66&
FillStyle = 0 'Solid
Height = 495
Left = 0
Top = 6720
Width = 9495
End
Begin VB.Label Label9
BackColor = &H00A27E66&
Caption = "上海朗力通讯设备有限公司"
ForeColor = &H8000000E&
Height = 255
Left = 480
TabIndex = 12
Top = 120
Width = 2175
End
Begin VB.Line Line8
BorderColor = &H80000005&
X1 = 120
X2 = 9360
Y1 = 120
Y2 = 120
End
Begin VB.Line Line9
BorderColor = &H80000005&
X1 = 120
X2 = 9360
Y1 = 240
Y2 = 240
End
Begin VB.Line Line10
BorderColor = &H80000005&
X1 = 120
X2 = 9360
Y1 = 300
Y2 = 300
End
Begin VB.Line Line11
BorderColor = &H80000005&
X1 = 120
X2 = 9360
Y1 = 180
Y2 = 180
End
Begin VB.Shape Shape2
BorderStyle = 0 'Transparent
FillColor = &H00A27E66&
FillStyle = 0 'Solid
Height = 495
Left = 0
Top = 0
Width = 9495
End
Begin VB.Shape Shape1
BackColor = &H00FFFFC0&
BackStyle = 1 'Opaque
Height = 4695
Left = 1560
Top = 1800
Width = 7695
End
End
Attribute VB_Name = "frmTemp"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Sub RefreshData()
Dim num As Integer
Dim rst As Recordset
Dim strtmp As String
num = 0
Set rst = db.OpenRecordset("select * from customer")
With Usergrid
.Cols = 5
.TextMatrix(0, 0) = "序号": .ColWidth(0) = 1000:
.TextMatrix(0, 1) = "手机号": .ColWidth(1) = 2000:
.TextMatrix(0, 2) = "联系人姓名": .ColWidth(2) = 2000:
.TextMatrix(0, 3) = "联系人单位": .ColWidth(3) = 2000:
.TextMatrix(0, 4) = "id": .ColWidth(4) = 0:
End With
Usergrid.Rows = 1
While Not rst.EOF
num = num + 1
strtmp = CStr(num) & Chr(9)
strtmp = strtmp & rst("mobile") & Chr(9)
strtmp = strtmp & rst("name") & Chr(9)
strtmp = strtmp & rst("company") & Chr(9)
strtmp = strtmp & rst("id") & Chr(9)
Usergrid.AddItem (strtmp)
rst.MoveNext
Wend
rst.Close
End Sub
Private Sub cmdAdd_Click()
frmUser.Show 1
End Sub
Private Sub cmdContent_Click()
frmMsg.Show
Me.Hide
End Sub
Private Sub cmdExit_Click()
End
End Sub
Private Sub cmdSend_Click()
Dim num As Integer
Dim rst As Recordset
Dim msg As String
msg = frmMsg.txtMessage
Set rst = db.OpenRecordset("select * from customer")
While Not rst.EOF
Call Sendsms("8613800210500", rst("mobile"), msg)
rst.MoveNext
Wend
End Sub
Private Sub Command8_Click()
Dim Mobile As String
Dim id As Integer
Dim sql As String
If Usergrid.Rows > 1 Then
With Usergrid
If .TextMatrix(.Row, 0) = "" Then
Exit Sub
End If
id = Trim(.TextMatrix(.Row, 4))
Mobile = Trim(.TextMatrix(.Row, 1))
End With
If MsgBox("确认要删除手机号为:[" & Mobile & "] 的信息吗?", vbOKCancel, "提示") = vbCancel Then
Exit Sub
Else
sql = "delete from customer where id= " & id
db.Execute (sql)
Call RefreshData
End If
End If
End Sub
Private Sub Form_Load()
Line13.X1 = 0
Line13.X2 = frmCustom.Width
Line13.Y1 = frmCustom.Height - 10
Line13.Y2 = frmCustom.Height - 10
Line14.X1 = frmCustom.Width - 10
Line14.X2 = frmCustom.Width - 10
Line14.Y1 = 0
Line14.Y2 = frmCustom.Height
Line15.X1 = 0
Line15.X2 = frmCustom.Width
Line15.Y1 = frmCustom.Top
Line15.Y2 = frmCustom.Top
Line16.X1 = frmCustom.Left
Line16.X2 = frmCustom.Left
Line16.Y1 = 0
Line16.Y2 = frmCustom.Height
Call dao_Connection
Call RefreshData
End Sub
Private Sub Label11_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -