?? mdiform1.frm
字號:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Begin VB.MDIForm MDIForm1
BackColor = &H8000000C&
Caption = "遠程水文監測系統"
ClientHeight = 5370
ClientLeft = 315
ClientTop = 885
ClientWidth = 11310
LinkTopic = "MDIForm1"
WindowState = 2 'Maximized
Begin MSComctlLib.ImageList ImageList1
Left = 3720
Top = 1440
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 5
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MDIForm1.frx":0000
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MDIForm1.frx":0452
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MDIForm1.frx":08A4
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MDIForm1.frx":0CF6
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MDIForm1.frx":1B48
Key = ""
EndProperty
EndProperty
End
Begin MSComctlLib.StatusBar StatusBar1
Align = 2 'Align Bottom
Height = 375
Left = 0
TabIndex = 0
Top = 4995
Width = 11310
_ExtentX = 19950
_ExtentY = 661
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 4
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 1
Enabled = 0 'False
Object.Width = 11748
Text = "遠程水文監測系統"
TextSave = "遠程水文監測系統"
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 6
TextSave = "2002-11-1"
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 5
TextSave = "19:33"
EndProperty
BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 1
Enabled = 0 'False
TextSave = "CAPS"
EndProperty
EndProperty
End
Begin MSComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 570
Left = 0
TabIndex = 1
Top = 0
Width = 11310
_ExtentX = 19950
_ExtentY = 1005
ButtonWidth = 1773
ButtonHeight = 953
Wrappable = 0 'False
Appearance = 1
Style = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 8
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "自動接收"
Key = "AutoRec"
ImageIndex = 1
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 4
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "數據請求"
Key = "DataAsk"
ImageIndex = 3
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 4
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "查詢與顯示"
Key = "DataQuery"
ImageIndex = 4
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "退出系統"
Key = "Exit"
ImageIndex = 5
EndProperty
BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
EndProperty
BorderStyle = 1
Begin MSCommLib.MSComm Comm1
Left = 6480
Top = 0
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
DTREnable = -1 'True
End
Begin MSComDlg.CommonDialog Dialog
Left = 7200
Top = 120
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 650
Left = 7680
Top = 0
End
End
Begin VB.Menu ParaSetting
Caption = "系統參數設定(&P)"
Begin VB.Menu StateNo
Caption = "狀態碼設定(&S)"
End
Begin VB.Menu io
Caption = "I/O值設定(&I)"
End
Begin VB.Menu shezhi
Caption = "電流最大值設定(&M)"
End
Begin VB.Menu aa
Caption = "-"
End
Begin VB.Menu exit
Caption = "退出(&E)"
End
End
Begin VB.Menu jiance
Caption = "數據檢測(&D)"
Begin VB.Menu AutoRecData
Caption = "自動接收數據(&R)"
End
Begin VB.Menu DataAsk
Caption = "請求數據(&A)"
End
End
Begin VB.Menu DBManage
Caption = "數據庫管理與查詢(&M)"
Begin VB.Menu DataQuery
Caption = "數據查詢(&Q)"
End
Begin VB.Menu DataBackup
Caption = "數據備份(&B)"
End
Begin VB.Menu DataRestore
Caption = "數據恢復(&R)"
End
End
Begin VB.Menu help
Caption = "幫助(&H)"
Begin VB.Menu about
Caption = "關于(&A)"
End
End
End
Attribute VB_Name = "MDIForm1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub about_Click()
frmAbout.Show
End Sub
Private Sub AutoRecData_Click()
Frmzhenting.Show
End Sub
Private Sub DataAsk_Click()
Frmqingqiu.Show
End Sub
Private Sub DataBackup_Click()
On Error GoTo err
Dialog.filename = "" 'Dialog控件的filename屬性設置文件的名稱
Dialog.Filter = "MDB files (*.mdb) |*.mdb|" '設置文件的類型
Dialog.ShowSave '設置彈出窗口的類型,這里是保存文件的類型
If Dialog.Flags <> 0 Then '判斷用戶的選擇,為0,代表取消備份
If Dialog.filename <> "" Then
If FileLen(App.Path & "\db\db1.MDB") > 1210000 Then
MsgBox "數據庫文件過大!", vbOKOnly, "通知" '判斷數據庫文件是否過大
Else
FileCopy App.Path & "\db\db1.MDB", Dialog.filename
'按照選擇的路徑,把數據庫文件復制過去
MsgBox "備份已經完成", vbOKOnly, "通知"
End If
End If
End If
Exit Sub
err:
MsgBox "對不起,備份出錯!請關掉所有子窗口重試!", vbOKOnly, "通知"
End Sub
Private Sub DataQuery_Click()
Frmchaxun.Show
End Sub
Private Sub DataRestore_Click()
On Error GoTo err
Dialog.filename = "" 'Dialog控件的filename屬性設置文件的名稱
Dialog.Filter = "MDB files (*.mdb) |*.mdb|" '設置文件的類型
Dialog.ShowOpen '設置彈出窗口的類型,這里是保存文件的類型
If Dialog.Flags <> 0 Then '判斷用戶的選擇,為0,代表取消備份
If Dialog.filename <> "" Then
If FileLen(App.Path & "\db\db1.MDB") > 1210000 Then
MsgBox "數據庫文件過大!", vbOKOnly, "通知" ' '判斷數據庫文件是否過大
Else
FileCopy Dialog.filename, App.Path & "\db\db1.MDB"
'按照選擇的路徑,把數據庫文件復制過去
MsgBox "導入已經完成", vbOKOnly, "通知"
End If
End If
End If
Exit Sub
err:
MsgBox "對不起,導入出錯!請關掉所有子窗口重試!", vbOKOnly, "通知"
End Sub
Private Sub exit_Click()
Unload Me
End
End Sub
Private Sub io_Click()
Frmstate.Show
End Sub
Private Sub MDIForm_Load()
If Comm1.PortOpen = False Then
Comm1.CommPort = portitem '設置端口號
Comm1.PortOpen = True '打開端口
Comm1.Output = "AT+CNMI=1,1,0,0,1" + Chr(13) + Chr(10) '設置新消息指示方式,以回車和換行
' 符結束
Timer1.Enabled = True '觸發計時器
End If
End Sub
Private Sub MDIForm_Unload(Cancel As Integer)
Unload Me
End Sub
Private Sub shezhi_Click()
Frmliumax.Show
End Sub
Private Sub StateNo_Click()
Frmstateno.Show
End Sub
Private Sub Timer1_Timer()
Dim Buf$
If Comm1.InBufferCount > 0 Then
Comm1.InputLen = 0
Buf = Comm1.Input
Timer1.Enabled = False
End If
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
On Error Resume Next
Select Case Button.Key
Case "DataRec"
Frmzhenting.Show
Case "DataAsk"
Frmqingqiu.Show
Case "DataQuery"
Frmchaxun.Show
Case "Exit"
Unload Me
End Select
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -