📄 form_main.frm
字号:
VERSION 5.00
Begin VB.Form Form_Main
Caption = "连接文件服务器"
ClientHeight = 3090
ClientLeft = 3945
ClientTop = 3405
ClientWidth = 4680
ControlBox = 0 'False
Icon = "Form_Main.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3090
ScaleWidth = 4680
Begin VB.CommandButton Com_ok
Caption = "是"
Height = 375
Left = 960
TabIndex = 0
Top = 2520
Width = 1095
End
Begin VB.CommandButton Com_quit
Caption = "否"
Height = 375
Left = 2400
TabIndex = 1
Top = 2520
Width = 1215
End
Begin VB.CheckBox Check_Type
Caption = "系统启动时提示"
Height = 375
Left = 120
TabIndex = 2
Top = 2040
Width = 1815
End
Begin VB.Label Label_Path
Height = 615
Left = 120
TabIndex = 5
Top = 1440
Width = 4455
End
Begin VB.Label Label_Main
Caption = "系统的文件服务器是存放数据文件的PC服务器,要对文件操作,必须确保文件服务器共享路径开通以及客户端连接到文件服务器共享目录"
ForeColor = &H000000FF&
Height = 615
Left = 240
TabIndex = 3
Top = 600
Width = 4215
End
Begin VB.Label Label1
Caption = "说明:"
Height = 255
Left = 240
TabIndex = 4
Top = 240
Width = 495
End
End
Attribute VB_Name = "Form_Main"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim WithEvents ieView As InternetExplorer
Attribute ieView.VB_VarHelpID = -1
Private Sub Check_Type_Click()
Dim strType As String
If Check_Type.Value = 1 Then
strType = "0"
Else
strType = "1"
End If
If CModule.WriteConfig("Connect", "Type", strType) = False Then
MsgBox "写配置文件错误,请检查配置文件config.ini"
End If
End Sub
Private Sub Com_Ok_Click()
Set ieView = GetObject("", "InternetExplorer.Application")
ieView.Visible = True
'创建Internet Explorer对象的一个实例,并设为可见
txtAddress = "\\" & CModule.objIp & "\" & CModule.objPath
ieView.Navigate txtAddress, navNoReadFromCache
Set ieView = Nothing
Unload Me
End Sub
Private Sub Com_quit_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim strType As String
Label_Path.Caption = "是否连接文件服务器共享目录""\\" & CModule.objIp & "\" & CModule.objPath
'是否显示打通文件服务器路径
If CModule.GetConfig("Connect", "Type", strType) = False Then
MsgBox strType
Exit Sub
End If
If CInt(strType) = 0 Then
Check_Type.Value = 1
Else
Check_Type.Value = 0
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -