📄 main.frm
字号:
VERSION 5.00
Begin VB.Form sys_main
BorderStyle = 1 'Fixed Single
ClientHeight = 6720
ClientLeft = 2010
ClientTop = 15
ClientWidth = 6525
ControlBox = 0 'False
FillStyle = 4 'Upward Diagonal
KeyPreview = -1 'True
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6720
ScaleWidth = 6525
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
IMEMode = 3 'DISABLE
Index = 2
Left = 1920
PasswordChar = "#"
TabIndex = 4
Top = 4080
Width = 2775
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 1
Left = 1920
TabIndex = 2
Top = 3120
Width = 2775
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 0
Left = 1920
TabIndex = 0
Text = "FYCYXX"
Top = 2160
Width = 2775
End
Begin VB.Image Image4
Height = 570
Left = 3480
Picture = "main.frx":0000
Top = 4920
Width = 1260
End
Begin VB.Image Image3
Height = 570
Left = 1680
Picture = "main.frx":04C2
Top = 4920
Width = 1260
End
Begin VB.Image Image2
Height = 8775
Left = -120
Picture = "main.frx":0948
Top = 0
Width = 6810
End
Begin VB.Image Image1
Height = 21930
Left = -120
Top = -120
Width = 17025
End
Begin VB.Label Label1
Caption = "密 码:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 2
Left = 720
TabIndex = 5
Top = 3720
Width = 855
End
Begin VB.Label Label1
Caption = "用户名:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 1
Left = 720
TabIndex = 3
Top = 3000
Width = 855
End
Begin VB.Label Label1
Caption = "服务器:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 0
Left = 720
TabIndex = 1
Top = 2280
Width = 855
End
End
Attribute VB_Name = "sys_main"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public CS_LX As Integer
Private Sub Form_Load()
Text1(0).Text = Get_ProfileInfo("jdgl.ini", "[DB Connection]", "server")
End Sub
Private Sub Image3_Click()
'On Error GoTo Error_Handler
Dim temp_rec As ADODB.Recordset
Dim username As String
Dim paswd As String
'MsgBox "1"
username = Get_ProfileInfo("jdgl.ini", "[DB Connection]", "user")
paswd = Get_ProfileInfo("jdgl.ini", "[DB Connection]", "paswrd")
'MsgBox "2"
Set objConn = CreateObject("ADODB.Connection")
'MsgBox "3"
objConn.Open "Provider=SQLOLEDB;Data Source=" & Trim(Text1(0).Text) & ";User Id=" & Trim(username) & ";Password=" & Trim(paswd)
'objConn.Open "Provider=SQLOLEDB;Data Source=" & Trim(Text1(0).Text) & ";User Id=sa;Password=63418200"
'MsgBox "4"
objConn.DefaultDatabase = Get_ProfileInfo("jdgl.ini", "[DB Connection]", "datebase")
'MsgBox "5"
objConn.CommandTimeout = 300
'Set PUB_data = WRK.OpenDatabase("JDGL", dbDriverNoPrompt, False, "uid=" & sys_uid & ";pwd=" & sys_pwd)
'MsgBox "6"
'Set temp_rec = PUB_data.OpenRecordset("SELECT * FROM N_USER WHERE UR='" & Trim(Text1(1).Text) & "' AND PASWD='" & Trim(Text1(2).Text) & "'", 2, 0, 2)
Set temp_rec = New ADODB.Recordset
temp_rec.Source = "SELECT * FROM N_USER WHERE UR='" & Trim(Text1(1).Text) & "' AND PASWD='" & Trim(Text1(2).Text) & "'"
Set temp_rec.ActiveConnection = objConn
temp_rec.CursorType = adOpenDynamic
temp_rec.LockType = adLockOptimistic
temp_rec.Open
'MsgBox "7"
If Not temp_rec.EOF Then
'SYS_GWMC = "前台接待处"
'SYS_GWDM = "DT"
SYS_USER = temp_rec.Fields("NAME")
SYS_NAME = temp_rec.Fields("power")
'SYS_RIGHT = "4"
Call dt_main.MAIN(SYS_USER, SYS_NAME)
Me.Hide
dt_main.Show (1)
Call Image4_Click
Else
MsgBox "密码错误,请重新输入!"
End If
temp_rec.Close
Set temp_rec = Nothing
Error_Handler:
MsgBox "数据连接异常错误!"
'temp_rec.Close
'Set temp_rec = Nothing
'objConn.Close
'Set objConn = Nothing
End Sub
Private Sub Image4_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -