📄 amuseedit.frm
字号:
VERSION 5.00
Begin VB.Form AmuseEdit
BorderStyle = 1 'Fixed Single
Caption = "编辑旅游娱乐厅信息"
ClientHeight = 2730
ClientLeft = 45
ClientTop = 330
ClientWidth = 9135
Icon = "AmuseEdit.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2730
ScaleWidth = 9135
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Height = 1695
Left = 240
TabIndex = 9
Top = 120
Width = 8655
Begin VB.TextBox txtAmuse
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 5640
MaxLength = 100
TabIndex = 2
Top = 255
Width = 2775
End
Begin VB.ComboBox ComboType
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
ItemData = "AmuseEdit.frx":27A2
Left = 1320
List = "AmuseEdit.frx":27AF
Style = 2 'Dropdown List
TabIndex = 0
Top = 255
Width = 975
End
Begin VB.ComboBox ComboName
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 2400
Style = 2 'Dropdown List
TabIndex = 1
Top = 255
Width = 1695
End
Begin VB.TextBox txtContact
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 1320
MaxLength = 50
TabIndex = 3
Top = 710
Width = 2775
End
Begin VB.TextBox txtPhone
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 5640
MaxLength = 100
TabIndex = 4
Top = 710
Width = 2775
End
Begin VB.TextBox txtAddress
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 1320
MaxLength = 200
TabIndex = 5
Top = 1150
Width = 2775
End
Begin VB.TextBox txtCode
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 5640
MaxLength = 20
TabIndex = 6
Top = 1150
Width = 2775
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "所属旅游地"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 240
TabIndex = 15
Top = 315
Width = 900
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "联系人"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 240
TabIndex = 14
Top = 770
Width = 540
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "联系电话"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 4560
TabIndex = 13
Top = 770
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "娱乐厅名称"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 4560
TabIndex = 12
Top = 315
Width = 900
End
Begin VB.Label Label10
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "通信地址"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 240
TabIndex = 11
Top = 1225
Width = 720
End
Begin VB.Label Label11
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "邮政编码"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 4560
TabIndex = 10
Top = 1225
Width = 720
End
End
Begin VB.CommandButton Cmd_Cancel
Cancel = -1 'True
Caption = "取 消"
Height = 400
Left = 5115
MouseIcon = "AmuseEdit.frx":27C5
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 8
Top = 2040
Width = 1300
End
Begin VB.CommandButton Cmd_Ok
Caption = "确 定"
Default = -1 'True
Height = 400
Left = 2745
MouseIcon = "AmuseEdit.frx":2ACF
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 7
Top = 2040
Width = 1300
End
End
Attribute VB_Name = "AmuseEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OriId As Long
Public OriAreaName, OriAmuseName As String
Public OriType As Integer
Private Function Check() As Boolean
If Trim(txtAmuse) = "" Then
MsgBox "请输入地域名称"
txtAmuse.SetFocus
Check = False
Exit Function
End If
If Trim(txtAmuse) = "" Then
MsgBox "请输入娱乐厅名称"
txtAmuse.SetFocus
Check = False
Exit Function
End If
Check = True
End Function
Private Sub Cmd_OK_Click()
If Check = False Then
Exit Sub
End If
With MyAmuse
.Aname = MakeStr(txtAmuse)
.Contact = MakeStr(txtContact)
.Phone = MakeStr(txtPhone)
.Address = MakeStr(txtAddress)
.Postcode = MakeStr(txtCode)
.AreaId = MyArea.GetId(ComboName)
If Modify = False Or OriAmuseName <> Trim(txtAmuse) Then
If .In_DB(MakeStr(txtAmuse)) = True Then
MsgBox "娱乐厅名称已经存在,请重新输入"
txtAmuse.SetFocus
txtAmuse.SelStart = 0
txtAmuse.SelLength = Len(txtAmuse)
Exit Sub
End If
End If
If Modify = False Then
.Insert
Else
.Update (OriId)
End If
End With
Unload Me
End Sub
Private Sub Cmd_Cancel_Click()
Unload Me
End Sub
Private Sub ComboType_Click()
Call Loadarea(ComboType.ListIndex + 1, ComboName)
If ComboName.ListCount > 0 Then
ComboName.ListIndex = 0
End If
End Sub
Private Sub Form_Load()
ComboType.ListIndex = OriType - 1
Call Loadarea(OriType, ComboName)
If InCombo(OriAreaName, ComboName) = True Then
ComboName.Text = OriAreaName
End If
End Sub
Private Sub txtAddress_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtCode_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtContact_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtPhone_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtAmuse_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -