【VB开源代码栏目提醒】:网学会员鉴于大家对VB开源代码十分关注,论文会员在此为大家搜集整理了“Main_OP.frm”一文,供大家参考学习
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Main_OP
BackColor = &H00E0E0E0&
BorderStyle = 1 'Fixed Single
Caption = "操作员设置"
ClientHeight = 2835
ClientLeft = 45
ClientTop = 330
ClientWidth = 6690
Icon = "Main_OP.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2835
ScaleWidth = 6690
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame2
BackColor = &H00E0E0E0&
Height = 2055
Left = 60
TabIndex = 3
Top = 90
Width = 6585
Begin VB.TextBox TxtOP
DataField = "操作员"
DataSource = "Adodc1"
Enabled = 0 'False
Height = 360
IMEMode = 3 'DISABLE
Left = 1635
MaxLength = 6
TabIndex = 5
Top = 330
Width = 4170
End
Begin VB.TextBox TxtPassword
DataField = "密码"
DataSource = "Adodc1"
Enabled = 0 'False
Height = 360
IMEMode = 3 'DISABLE
Left = 1635
MaxLength = 6
TabIndex = 4
Top = 870
Width = 4170
End
Begin MSAdodcLib.Adodc Adodc1
Height = 390
Left = 930
Top = 1410
Width = 4920
_ExtentX = 8678
_ExtentY = 688
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = 12648447
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=GFGL"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=GFGL"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 操作员信息表"
Caption = " 移动记录"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "操作员: 密 码:"
Height = 765
Left = 885
TabIndex = 6
Top = 420
Width = 720
End
End
Begin VB.Frame Frame1
BackColor = &H00E0E0E0&
Height = 735
Left = 60
TabIndex = 0
Top = 2025
Width = 6585
Begin VB.CommandButton CmdDelete
BackColor = &H00FF8080&
Caption = "删除"
Height = 390
Left = 3675
Style = 1 'Graphical
TabIndex = 9
Top = 180
Width = 1200
End
Begin
VB.CommandButton CmdEnd
BackColor = &H00FF8080&
Caption = "退出"
Height = 390
Left = 5040
Style = 1 'Graphical
TabIndex = 8
Top = 180
Width = 1425
End
Begin VB.CommandButton CmdModify
BackColor = &H00FF8080&
Caption = "修改"
Height = 390
Left = 2490
Style = 1 'Graphical
TabIndex = 7
Top = 180
Width = 1200
End
Begin VB.CommandButton CmdSave
BackColor = &H00FF8080&
Caption = "保存"
Height = 390
Left = 1305
Style = 1 'Graphical
TabIndex = 2
Top = 180
Width = 1200
End
Begin VB.CommandButton CmdAdd
BackColor = &H00FF8080&
Caption = "添加"
Height = 390
Left = 120
Style = 1 'Graphical
TabIndex = 1
Top = 180
Width = 1200
End
End
End
Attribute VB_Name = "Main_OP"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub TxtOP_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then TxtPassword.SetFocus
End Sub
Private Sub CmdAdd_Click()
TxtOP.Enabled = True
TxtPass
word.Enabled = True
TxtOP.SetFocus
Adodc1.Recordset.AddNew
End Sub
Private Sub CmdSave_Click()
Adodc1.Recordset.Update
TxtOP.Enabled = False
TxtPassword.Enabled = False
End Sub
Private Sub CmdModify_Click()
TxtOP.Enabled = True
TxtPassword.Enabled = True
End Sub
Private Sub CmdDelete_Click()
On Error Resume Next
Adodc1.Recordset.Delete
End Sub
Private Sub CmdEnd_Click()
Frm_Main.Show
Unload Me
End Sub