📄 form2.frm
字号:
VERSION 5.00
Begin VB.Form Form2
Caption = "Connection"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 6555
LinkTopic = "Form2"
ScaleHeight = 3090
ScaleWidth = 6555
StartUpPosition = 2 'CenterScreen
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 1
Left = 1200
Top = 2640
End
Begin VB.CommandButton Command3
Caption = "Quit"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4560
TabIndex = 10
Top = 1920
Width = 1335
End
Begin VB.CommandButton Command2
Caption = "Apply Save"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4560
TabIndex = 9
Top = 960
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "Connect"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4560
TabIndex = 8
Top = 480
Width = 1335
End
Begin VB.TextBox txtUser
Height = 375
Left = 2160
TabIndex = 0
Top = 480
Width = 2295
End
Begin VB.TextBox txtPass
Height = 375
Left = 2160
TabIndex = 1
Top = 960
Width = 2295
End
Begin VB.TextBox txtDBase
Height = 375
Left = 2160
TabIndex = 2
Top = 1440
Width = 2295
End
Begin VB.TextBox txtString
Height = 375
Left = 2160
TabIndex = 3
Top = 1920
Width = 2295
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "User"
Height = 375
Left = 720
TabIndex = 7
Top = 480
Width = 1485
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "Password"
Height = 375
Left = 720
TabIndex = 6
Top = 960
Width = 1485
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "Database Name"
Height = 375
Left = 720
TabIndex = 5
Top = 1440
Width = 1485
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "Connection String"
Height = 375
Left = 720
TabIndex = 4
Top = 1920
Width = 1485
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Call CnConnect(txtDBase.Text, txtPass.Text, txtUser.Text)
Call SaveSetting("Oracle", "DBRS", "Dbase", txtDBase.Text)
Call SaveSetting("Oracle", "DBRS", "user", txtUser.Text)
Call SaveSetting("Oracle", "DBRS", "Pass", txtPass.Text)
Call SaveSetting("Oracle", "DBRS", "ConString", txtString.Text)
Unload Me
End Sub
Private Sub Form_Load()
txtDBase.Text = GetSetting("Oracle", "DBRS", "Dbase")
txtUser.Text = GetSetting("Oracle", "DBRS", "user")
txtPass.Text = GetSetting("Oracle", "DBRS", "pass")
txtString.Text = GetSetting("Oracle", "DBRS", "ConString")
If txtDBase.Text = "" Then Exit Sub
If txtUser.Text = "" Then Exit Sub
If txtPass.Text = "" Then Exit Sub
'If txtString.Text = "" Then Exit Sub
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
Call CnConnect(txtDBase.Text, txtPass.Text, txtUser.Text, "")
Unload Me
Timer1.Enabled = False
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -