📄
字号:
VERSION 5.00
Begin VB.Form frmMain
BackColor = &H00FFFF80&
BorderStyle = 1 'Fixed Single
Caption = "主窗口"
ClientHeight = 3240
ClientLeft = 3045
ClientTop = 2760
ClientWidth = 6435
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3240
ScaleWidth = 6435
Begin VB.CommandButton cmdExit
Caption = "退出本系统"
Height = 495
Left = 1440
TabIndex = 3
Top = 2640
Width = 3255
End
Begin VB.CommandButton cmdQuery
Caption = "住客信息查询"
Height = 495
Left = 1440
TabIndex = 2
Top = 2040
Width = 3255
End
Begin VB.CommandButton cmdLeave
Caption = "住客退房"
Height = 495
Left = 1440
TabIndex = 1
Top = 1440
Width = 3255
End
Begin VB.CommandButton cmdAdd
Caption = "添加新住客"
Height = 495
Left = 1440
TabIndex = 0
Top = 840
Width = 3255
End
Begin VB.Line Line1
X1 = 120
X2 = 6360
Y1 = 720
Y2 = 720
End
Begin VB.Label Label1
BackColor = &H00FFFF80&
Caption = "宾馆管理系统"
BeginProperty Font
Name = "仿宋_GB2312"
Size = 26.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 615
Left = 360
TabIndex = 4
Top = 120
Width = 3375
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public strPassword As String ' 得到用户密码
Private Sub Form_Load()
Dim str1 As String
frmPassword.Show 1
If Trim(strPassword) <> "123456" Then '如果密码不正确,退出
Unload Me
Else
' 提示输入文件所在路径
str1 = InputBox("请输入文件存放的路径。" & Chr(10) & "(默认为C盘根目录)")
If Len(Trim(str1)) = 0 Then str1 = "c:\"
If Right(str1, 1) <> "\" Then str1 = str1 & "\"
strGuestData = str1 & "住客信息.txt"
strGuestNum = str1 & "住客人数.txt"
strRoomNo = str1 & "房间号.txt"
strTitle = str1 & "职称.txt"
End If
End Sub
Private Sub cmdAdd_Click()
frmAdd.Show 1 '加载显示frmAdd窗体
End Sub
Private Sub cmdLeave_Click()
frmLeave.Show 1 '加载显示frmLeave窗体
End Sub
Private Sub cmdQuery_Click()
frmQuery.Show 1 '加载显示frmQuery窗体
End Sub
Private Sub cmdExit_Click()
Unload Me '卸载窗体,退出系统
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -