main_mima.frm
来自「完整的物资管理系统源码」· FRM 代码 · 共 309 行
FRM
309 行
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form main_mima
BackColor = &H00808080&
BorderStyle = 3 'Fixed Dialog
Caption = "欢迎使用明日物资管理系统"
ClientHeight = 2970
ClientLeft = 45
ClientTop = 330
ClientWidth = 5880
Icon = "main_mima.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "main_mima.frx":164A
ScaleHeight = 2970
ScaleWidth = 5880
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.Frame Frame2
BackColor = &H80000005&
Height = 1980
Left = 75
TabIndex = 2
Top = 90
Width = 5745
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
IMEMode = 3 'DISABLE
Left = 1875
PasswordChar = "*"
TabIndex = 6
Top = 720
Width = 2835
End
Begin VB.CommandButton Cmd1
BackColor = &H00C0C0C0&
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 400
Left = 2535
MaskColor = &H00FF8080&
Picture = "main_mima.frx":3FEC8
Style = 1 'Graphical
TabIndex = 5
Top = 1350
UseMaskColor = -1 'True
Width = 1350
End
Begin VB.CommandButton Cmd2
BackColor = &H00C0C0C0&
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 400
Left = 3900
Picture = "main_mima.frx":4180B
Style = 1 'Graphical
TabIndex = 4
Top = 1350
Width = 1350
End
Begin MSDataListLib.DataCombo DataCombo1
Bindings = "main_mima.frx":431C5
Height = 330
Left = 1875
TabIndex = 3
Top = 300
Width = 2835
_ExtentX = 5001
_ExtentY = 582
_Version = 393216
MatchEntry = -1 'True
Style = 2
ListField = "操作员"
Text = ""
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "操作员: "
BeginProperty Font
Name = "黑体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Left = 975
TabIndex = 9
Top = 330
Width = 975
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "密 码: "
BeginProperty Font
Name = "黑体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Left = 975
TabIndex = 8
Top = 780
Width = 975
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "版权所有 违者必究"
Height = 225
Left = 510
TabIndex = 7
Top = 1455
Width = 1725
End
End
Begin VB.Frame Frame1
Caption = "Frame1"
Height = 930
Left = -1605
TabIndex = 0
Top = 585
Visible = 0 'False
Width = 1680
Begin VB.TextBox Textime
Height = 270
Left = 165
TabIndex = 1
Top = 555
Visible = 0 'False
Width = 1230
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 90
Top = 210
Width = 1500
_ExtentX = 2646
_ExtentY = 582
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 = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=mr_material"
OLEDBString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=mr_material"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from tb_power"
Caption = "Adodc1"
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
End
Begin VB.Frame Frame3
BackColor = &H80000005&
Height = 750
Left = 75
TabIndex = 10
Top = 2085
Width = 5745
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = " 系统超级用户mr的初始密码为""mingrisoft"",请进入系统后更改此密码。"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 435
Left = 165
TabIndex = 11
Top = 210
Width = 5355
End
End
End
Attribute VB_Name = "main_mima"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim TIM As Integer '定义一个整型变量
Dim rs1 As New ADODB.Recordset '定义一个数据集对象
Dim myval As String '定义一个单精度浮点型变量
Private Sub Form_Activate()
DataCombo1.SetFocus
End Sub
Private Sub DataCombo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Text2.SetFocus 'text2获得焦点
End Sub
Private Sub Form_Load()
Adodc1.RecordSource = "select * from tb_power"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveFirst
DataCombo1.text = Adodc1.Recordset.Fields("操作员")
Else
MsgBox "初次使用本系统,请在进入系统后设置操作员及其权限!", 0, "提示窗口"
Load frm_main
frm_main.Show
Unload Me
End If
End Sub
Private Sub text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Cmd1.Visible = True
Cmd1.SetFocus
End If
End Sub
Private Sub cmd1_Click()
'验证操作员及密码
Dim MESSAGE As String
Textime.text = TIM
Adodc1.RecordSource = "select * from tb_power where 操作员='" + DataCombo1.BoundText + "'"
Adodc1.Refresh
If DataCombo1.BoundText <> "" And Text2.text = Trim(Adodc1.Recordset.Fields("密码")) Then
Load frm_main
frm_main.Show
czy = Trim(DataCombo1.text)
Unload Me
Else
If TIM = 3 Then
MESSAGE = MsgBox("密码输入错误,请向系统管理员查询!", 0, "")
If MESSAGE = vbOK Then End
End If
If DataCombo1.BoundText = "" Then
MsgBox ("请输入操作员!")
DataCombo1.SetFocus
Else
If Trim(DataCombo1.BoundText) <> Trim(Adodc1.Recordset.Fields("操作员")) Then
MsgBox ("查无此操作员,请重新输入操作员!")
DataCombo1.SetFocus
Else
If Text2.text <> Adodc1.Recordset.Fields("密码") Then
MsgBox ("密码错误,请重新输入密码!")
TIM = TIM + 1
Text2.SetFocus
End If
End If
End If
End If
End Sub
Private Sub cmd2_Click()
End
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?