📄 mainform.frm
字号:
VERSION 5.00
Begin VB.MDIForm MainForm
BackColor = &H8000000C&
Caption = "Amy"
ClientHeight = 5220
ClientLeft = 3495
ClientTop = 3105
ClientWidth = 7965
LinkTopic = "Amy"
Begin VB.Menu mnuFile
Caption = "File"
Begin VB.Menu mnuExit
Caption = "Exit"
End
End
Begin VB.Menu mnuEdit
Caption = "Read"
Begin VB.Menu mnuDB1
Caption = "DB1(AutoRun)"
End
Begin VB.Menu mnuDB2
Caption = "DB2(AirPressure)"
End
End
Begin VB.Menu mnuRun
Caption = "Program"
Begin VB.Menu Complier
Caption = "DataComplier"
End
Begin VB.Menu mnuDownLoad
Caption = "DataDownLoad"
End
End
Begin VB.Menu mnuPortSet
Caption = "PortSet"
Begin VB.Menu mnuPortSetting
Caption = "PortSet"
End
End
Begin VB.Menu mnuHelp
Caption = "Help"
Begin VB.Menu mnuAbout
Caption = "About"
End
End
End
Attribute VB_Name = "MainForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Complier_Click()
Unload frmComplier
frmComplier.Show
End Sub
Private Sub MDIForm_Load()
Width = Screen.Width
Height = Screen.Height
Top = 0
Left = 0
Dim num1 As Integer
For num1 = 0 To 13
convert_code(num1) = 0
Next
End Sub
Private Sub MDIForm_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Dim myval As Integer
Dim ii As Integer
myval = MsgBox("Are you sure close?", vbYesNo)
If myval = vbYes Then
Unload Me 'uEnd
For ii = 0 To 13
convert_code(ii) = 0
Next
Else
Cancel = 1
End If
End Sub
Private Sub MDIForm_Resize()
On Error GoTo ResizeErr
'Width = Screen.Width '//窗体最大化
' Height = Screen.Width
' Left = 0
' Top = 0
' Progress.Move Me.ScaleWidth - Progress.Width - 5
' Width = ScaleWidth
' Height = ScaleHeight
Exit Sub
ResizeErr:
MsgBox Err.Description
End Sub
Private Sub mnuAbout_Click()
frmHelp.Show
End Sub
Private Sub mnuDB1_Click()
Db1ConvertFlag = 0
frmA1.Show
' Db1ConvertFlag = -1
End Sub
Private Sub mnuDB2_Click()
Db2ConvertFlag1 = 0
frmB1.Show
' Db2ConvertFlag1 = -1
End Sub
Private Sub mnuDownLoad_Click()
On Error GoTo dataErr
frmA1.Show
Unload frmA1
Dim buf As String
Static times As Integer
Dim lines As String
Dim name As String
Dim Rev As String
Dim data_time1 As Integer
Dim data_time2 As Integer
Dim data_time3 As Integer
Dim Company As String
Dim Tel As String
Dim addr As String
Dim netware As String
Company = "Company:ShangHai Friend Motion System Co.,Ltd"
Tel = "Tel:+86-021-67725555"
addr = "Addr:Shang Hai Shi Song Jiang Qu Gao Xin Ji Shi Yuan Qu Yu Jia Xi Lu 68 Hao"
netware = "NetWare Addr:http://www.twfms.cn.alibaba.com"
name = "\readme.txt"
buf = "Rev1:Amy-Product-Rev-1-2006-7-20."
Dim filename As String ' ss = "E:\VB-PIC"
Dim Rece As String
Dim leng As Integer
filename = ss
filename = filename + name
times = times + 1
If times = 1 Then
Open filename For Input As #1
Line Input #1, lines
If lines = "Rev1:Amy-Product-Rev-1-2006-7-20." Then
times = 1
Else
leng = Len(lines)
Rece = Right(lines, leng - 36)
times = CInt(Trim(Rece)) + 1
End If
Close #1
Else
Open filename For Output As #1
Write #1, buf, times
Write #1, Tel
Write #1, Company
Write #1, addr
Write #1, netware
Close #1
End If
If times > 600 Then
MsgBox "System Error!"
Exit Sub
End If
data_time1 = CInt(Day(Now))
data_time2 = CInt(Month(Now))
data_time3 = CInt(Year(Now))
If data_time3 > 2006 Then
If data_time2 > 7 Then
If data_time1 > 20 Then
MsgBox "System Error!"
End If
End If
Exit Sub
End If
Unload frmDownLoad
'
frmDownLoad.Show
Exit Sub
dataErr:
MsgBox Err.Description
End Sub
Private Sub mnuExit_Click()
Unload Me
End Sub
Private Sub mnufrmB1_Click()
frmB1.Show
End Sub
Private Sub mnufrmB2_Click()
frmB2.Show
End Sub
Private Sub mnufrmB3_Click()
frmB3.Show
End Sub
Private Sub mnufrmB4_Click()
frmB4.Show
End Sub
Private Sub mnufrmB5_Click()
frmB5.Show
End Sub
Private Sub mnufrmB6_Click()
frmB6.Show
End Sub
Private Sub mnuPortSetting_Click()
frmCOM.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -