📄 frminfocol.frm
字号:
VERSION 5.00
Begin VB.Form FrmInfoCol
AutoRedraw = -1 'True
BackColor = &H00E0E0E0&
BorderStyle = 1 'Fixed Single
Caption = "数据连接"
ClientHeight = 4425
ClientLeft = 45
ClientTop = 330
ClientWidth = 5910
Icon = "FrmInfoCol.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4425
ScaleWidth = 5910
StartUpPosition = 3 'Windows Default
Begin VB.Frame Frame1
BackColor = &H00E0E0E0&
Height = 3885
Left = 2520
TabIndex = 6
Top = 0
Width = 3315
Begin VB.TextBox TxtServer
Appearance = 0 'Flat
Height = 315
Left = 120
TabIndex = 0
Top = 600
Width = 3045
End
Begin VB.TextBox Text2
Appearance = 0 'Flat
Enabled = 0 'False
Height = 285
Left = 1890
TabIndex = 7
Text = "sa"
Top = 1140
Width = 1245
End
Begin VB.TextBox Txtpwd
Appearance = 0 'Flat
Height = 285
IMEMode = 3 'DISABLE
Left = 1920
PasswordChar = "*"
TabIndex = 2
Top = 1680
Width = 1215
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "SQL Server机器名称"
Height = 195
Left = 150
TabIndex = 10
Top = 300
Width = 1545
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用户名称:"
Height = 195
Left = 780
TabIndex = 9
Top = 1170
Width = 765
End
Begin VB.Label Label3
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "口令:"
Height = 195
Left = 1200
TabIndex = 8
Top = 1710
Width = 405
End
End
Begin VB.CommandButton Command1
Caption = "上一步"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
Index = 2
Left = 2835
TabIndex = 4
Top = 3960
Width = 1110
End
Begin VB.CommandButton Command1
Caption = "下一步"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
Index = 0
Left = 4515
TabIndex = 3
Top = 3975
Width = 1110
End
Begin VB.CommandButton Command1
Caption = "退出安装程序"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
Index = 1
Left = 405
TabIndex = 5
Top = 3945
Width = 1425
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 3765
Left = 30
MultiLine = -1 'True
TabIndex = 1
Top = 90
Width = 2355
End
End
Attribute VB_Name = "FrmInfoCol"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click(Index As Integer)
Dim Connstring As String
Dim Conn As ADODB.Connection
Select Case Index
Case 0
'设置变量
On Error Resume Next
Sevname = TxtServer.Text
SevUser = "sa"
Sevpwd = Txtpwd.Text
Pubsaconnstring = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=master;Data Source=" & TxtServer.Text & ";password=" & Sevpwd
Set Conn = New ADODB.Connection
Conn.ConnectionString = Pubsaconnstring
Conn.Open
If err.Number <> 0 Then
MsgBox "数据库连接失败!(" & err.Description & ")"
Set Conn = Nothing
Exit Sub
End If
Me.Hide
FrmShixian.Show
Case 1
Unload Me
Case 2
Me.Hide
FrmConfigMain.Show
End Select
End Sub
Private Sub Command2_Click()
End Sub
Private Sub Form_Load()
'提示信息
Text1.Text = " SQL Server机器名称一般就是您的计算机名称,如果您安装了多个实例,请自行选择。" & vbCrLf & vbCrLf & " 在输入必要的信息后,请点击下一步,程序将根据您的输入信息和数据库进行通信。"
Text1.FontBold = True
'窗体居中
Me.Move Screen.Width / 2 - Me.Width / 2, Screen.Height / 2 - Me.Height / 2 - 600
'换皮肤
Call LoadSkin(Me)
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload FrmConfigMain
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -