📄 frmsetup.frm
字号:
VERSION 5.00
Begin VB.Form frmmain
BorderStyle = 0 'None
Caption = "Form1"
ClientHeight = 3000
ClientLeft = 0
ClientTop = 0
ClientWidth = 6690
LinkTopic = "Form1"
Picture = "frmsetup.frx":0000
ScaleHeight = 3000
ScaleWidth = 6690
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.Timer mousemovetimer
Enabled = 0 'False
Interval = 1
Left = 120
Top = 3000
End
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 200
Left = 480
Top = 3000
End
Begin VB.TextBox Text1
BackColor = &H80000004&
Height = 1215
Left = 1800
MultiLine = -1 'True
TabIndex = 0
Text = "frmsetup.frx":7E23C
Top = 1080
Width = 4215
End
Begin VB.Image mousermovepic
Height = 345
Left = 0
Picture = "frmsetup.frx":7E436
Top = 0
Width = 6675
End
Begin VB.Image picnext
Height = 285
Left = 5040
Picture = "frmsetup.frx":85C80
Top = 2520
Visible = 0 'False
Width = 1065
End
Begin VB.Image pictm
Height = 285
Left = 3480
Picture = "frmsetup.frx":86CCC
Top = 2520
Visible = 0 'False
Width = 1065
End
Begin VB.Image picam
Height = 285
Left = 5040
Picture = "frmsetup.frx":87D18
Top = 2520
Visible = 0 'False
Width = 1065
End
Begin VB.Image Image3
Height = 285
Left = 5040
Picture = "frmsetup.frx":88D64
Top = 2520
Visible = 0 'False
Width = 1065
End
Begin VB.Label c1
BackStyle = 0 'Transparent
Caption = "Label2"
Height = 735
Left = 2040
TabIndex = 2
Top = 1560
Width = 4095
End
Begin VB.Label c0
BackStyle = 0 'Transparent
Caption = "复制文件:"
Height = 375
Left = 2040
TabIndex = 1
Top = 1320
Width = 3495
End
Begin VB.Image Image4
Height = 285
Left = 5040
Picture = "frmsetup.frx":89DB0
Top = 2520
Visible = 0 'False
Width = 1065
End
Begin VB.Image Image2
Height = 285
Left = 5040
Picture = "frmsetup.frx":8ADFC
Top = 2520
Width = 1065
End
Begin VB.Image Image1
Height = 285
Left = 3480
Picture = "frmsetup.frx":8BE48
Top = 2520
Width = 1065
End
End
Attribute VB_Name = "frmmain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim oldx As Integer '为解决全图形窗口没有标题栏而无法拖动的问题而定义的鼠标新旧两个XY变量
Dim oldy As Integer
Dim newx As Integer
Dim newy As Integer
'>>>>>>>>>>>>>>>>>>>>>>>>以下程序段解决全图形窗口的移动问题<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
'移植须知:将该功能移植到一个全图片窗口以解决不能移动的问题时,需注意:1 赋值计时器和伪装标题栏到新的全图片窗体中;2 赋值定义的新旧XY值(4个)和本程序段到新的全图片窗体中;3 修改计时器的过程“mousemovetimer_Timer”中的四个窗体名字。4 修改伪装标题栏的图片
'当指定图片(伪装标题栏)被鼠标点击时启动计时器,并记录下当时的初始鼠标坐标
Private Sub mousermovepic_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
mousemovetimer.Enabled = True
oldx = X
oldy = Y
End Sub
'当指定图片(伪装标题栏)上鼠标移动时,赋给新的鼠标XY值,注意系统每隔很短的时间会赋值一次。
Private Sub mousermovepic_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
newx = X
newy = Y
End Sub
'当指定图片(伪装标题栏)被鼠标释放时关闭计时器。
Private Sub mousermovepic_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
mousemovetimer.Enabled = False
End Sub
'计时器将定时得到四个值,分别是固定的初始XY值,和不断变化的新的XY值。利用新旧XY的差,可以以此来移动窗体。适当调小计时器间隔时间将有助于移动窗体的流畅性。
Private Sub mousemovetimer_Timer()
frmmain.Left = frmmain.Left - (oldx - newx)
If frmmain.Top - (oldy - newy) < 1050 Then
frmmain.Top = 1050
Else
frmmain.Top = frmmain.Top - (oldy - newy)
End If
End Sub
'>>>>>>>>>>>>>>>>>>>>>>>>以上程序段解决全图形窗口的移动问题<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Private Sub Form_Load()
Me.Width = 6675
Me.Height = 3000
End Sub
'同意按钮功能实现
Private Sub Image1_Click()
Text1.Visible = False
Image1.Visible = False
Image2.Visible = False
Image4.Visible = True
Timer1.Enabled = True
'调用安装文件
Shell ("c:\windows\temp\ACCP学员管理系统安装程序.exe")
End Sub
'取消按钮功能实现
Private Sub Image2_Click()
Unload Me
End Sub
'完成按钮功能实现
Private Sub Image3_Click()
Unload Me
End Sub
'取消按钮功能实现
Private Sub Image4_Click()
Unload Me
End Sub
'下一步功能实现
Private Sub picnext_Click()
picnext.Visible = False
c1.Caption = ""
c0.Caption = "该系统需要配置SQL,推荐系统自动配置。手动配置请观看有关帮助。"
picam.Visible = True
pictm.Visible = True
End Sub
'>>>>>>>>>>>>>>自动、手动选择<<<<<<<<<<<<<<
'手动选择
Private Sub pictm_Click()
c1.Caption = ""
c0.Caption = "手动配置请观看开始菜单中《ACCP学员管理系统》的帮助,其中有视频教程和图文教程。"
picam.Visible = False
pictm.Visible = False
Image3.Visible = True
End Sub
'自动选择
Private Sub picam_Click()
If runtsql("RESTORE DATABASE accp from DISK = 'C:\Program Files\accp\ACCPdome.bak'") = False Then
MsgBox "数据库配置失败!", vbCritical + vbOKOnly, "警告!"
Unload Me
End If
c0.Caption = "设置完毕,请在开始菜单中运行。"
Image3.Visible = True
picam.Visible = False
pictm.Visible = False
End Sub
'>>>>>>>>>>>>>>自动、手动选择<<<<<<<<<<<<<<
'复制时的动态文字效果实现
Private Sub Timer1_Timer()
Static s As Integer
s = s + 1
Select Case s
Case 1
c1.Caption = "C:\Program Files\accp\ACCP学员管理系统.exe"
Case 2
c1.Caption = "C:\Program Files\accp\ACCP学员管理系统.exe"
Case 3
c1.Caption = "C:\Program Files\accp\ACCP学员管理系统.exe"
Case 4
c1.Caption = "C:\Program Files\accp\setupinfo.exe"
Case 5
c1.Caption = "C:\Program Files\accp\setupinfo.exe"
Case 6
c1.Caption = "C:\Program Files\accp\showchm.exe"
Case 7
c1.Caption = "C:\Program Files\accp\showdbhelp.exe"
Case 8
c1.Caption = "C:\Program Files\accp\showdbhelp.exe"
Case 9
c1.Caption = "C:\Program Files\accp\del.exe"
Case 10
c1.Caption = "C:\Program Files\accp\help\land\dbbook1.html"
Case 11
c1.Caption = "C:\Program Files\accp\showchm.exe"
Case 12
c1.Caption = "C:\Program Files\accp\help\accp\accphelp.chm"
Case 13
c1.Caption = "C:\Program Files\accp\help\land\pic\book.GIF"
Case 14
c1.Caption = "C:\Program Files\accp\help\land\rs\jc.avi"
Case 15
c1.Caption = "C:\Program Files\accp\help\land\rs\jc.avi"
Case 16
c1.Caption = "C:\Program Files\accp\help\land\rs\jc.avi"
Case 17
c1.Caption = "C:\Program Files\accp\help\land\rs\jc.avi"
Case 18
c1.Caption = "C:\Program Files\accp\end.swf"
Case 19
c1.Caption = "C:\Program Files\accp\setupinfo.swf"
Case 20
c0.Caption = "创建快捷方式:"
c1.Caption = "C:\Program Files\accp\ACCP学员管理系统.exe"
Case 21
c1.Caption = "C:\Program Files\accp\help\accp\accphelp.chm"
Case 22
c1.Caption = "C:\Program Files\accp\help\accp\卸载ACCP学员管理系统.exe"
Case 23, 24, 25, 26, 27, 28
c0.Caption = "删除临时文件..."
c1.Caption = ""
Case 29
c1.Caption = ""
c0.Caption = "安装完毕。"
Timer1.Enabled = False
Image4.Visible = False
picnext.Visible = True
End Select
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -