📄 form15.frm
字号:
End
Begin VB.Label Label16
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "元"
Height = 180
Left = 3120
TabIndex = 19
Top = 420
Width = 180
End
Begin VB.Label Label15
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "消费备注:"
ForeColor = &H000000FF&
Height = 180
Left = 840
TabIndex = 18
Top = 1500
Width = 900
End
Begin VB.Label Label14
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "此次消费金额共计:"
ForeColor = &H000000FF&
Height = 180
Left = 120
TabIndex = 17
Top = 960
Width = 1620
End
Begin VB.Label Label13
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "未折扣前价格:"
Height = 180
Left = 480
TabIndex = 16
Top = 420
Width = 1260
End
End
Begin VB.Frame Frame1
BackColor = &H00E7F7FF&
Caption = "会员信息"
Height = 1215
Left = 180
TabIndex = 2
Top = 600
Width = 9255
Begin VB.Label Label12
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Label12"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 180
Left = 7020
TabIndex = 14
Top = 780
Width = 735
End
Begin VB.Label Label11
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Label11"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 180
Left = 7020
TabIndex = 13
Top = 300
Width = 735
End
Begin VB.Label Label10
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Label10"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 180
Left = 4320
TabIndex = 12
Top = 780
Width = 735
End
Begin VB.Label Label9
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Label9"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 180
Left = 4320
TabIndex = 11
Top = 300
Width = 630
End
Begin VB.Label Label8
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Label8"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 180
Left = 1380
TabIndex = 10
Top = 780
Width = 630
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Label7"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 180
Left = 1380
TabIndex = 9
Top = 300
Width = 630
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "累计消费:"
Height = 180
Left = 6120
TabIndex = 8
Top = 780
Width = 900
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "会员级别:"
Height = 180
Left = 6120
TabIndex = 7
Top = 300
Width = 900
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "消费次数:"
Height = 180
Left = 3420
TabIndex = 6
Top = 780
Width = 900
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "会员姓名:"
Height = 180
Left = 3420
TabIndex = 5
Top = 300
Width = 900
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "卡内余额:"
Height = 180
Left = 480
TabIndex = 4
Top = 780
Width = 900
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "会员卡号:"
Height = 180
Left = 480
TabIndex = 3
Top = 300
Width = 900
End
End
Begin 会员管理系统.XPForm XPForm1
Height = 7515
Left = 0
TabIndex = 1
Top = 0
Width = 9615
_ExtentX = 16960
_ExtentY = 13256
Caption = "增加会员消费--快捷键F2或+可弹出"
End
End
Attribute VB_Name = "Form15"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'拖动窗体的API
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const HTCAPTION = 2
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Const WM_NCLBUTTONDOWN = &HA1
Private Sub Command2_Click()
Dim strSQL As String
strSQL = "INSERT INTO CUSTOMER (卡号,xiaofeiriqi,beizhu,xiaofeicishu) values ('" & Trim(Label7.caption) & "','" & Trim(DTPicker1.Value) & "','" & Trim(Combo2.Text) & "','" & Trim(Text2.Text) & "')"
If RunSQL(strSQL) = True Then
strSQL = "update hyxx set 卡内金额=卡内金额-'" & Text2.Text & "',会员金额=" & Form2.Label30.caption & "+'" & Text2.Text & "' where id=" & Form2.Label41.caption
If RunSQL(strSQL) = True Then
Form2.query_Form
Unload Me
End If
End If
End Sub
Private Sub Command2_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
'Dim strSQL As String
'strSQL = "update hyxx set 卡内金额=卡内金额-'" & Text2.Text & "',会员金额=" & Form2.Label30.caption & "+'" & Text2.Text & "' where id=" & Form2.Label41.caption
'If RunSQL(strSQL) = True Then
'Unload Me
'End If
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Command4_Click()
Form16.Show
End Sub
Private Sub Form_Load()
balance
Label25.caption = Text2.Text
XPForm1.BackColor = Me.BackColor
DTPicker1.Value = Format(Date, "yyyy-mm-dd")
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then Command2_Click
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii >= 48 And KeyAscii <= 57 Then
ElseIf KeyAscii = 8 Then
KeyCode = 8
Else
KeyAscii = 0
End If
End Sub
Private Sub Text2_KeyUp(KeyCode As Integer, Shift As Integer)
Label25.caption = Text2.Text
End Sub
Private Sub Text2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Text2.SelStart = 0
Text2.SelLength = Len(Text2.Text)
End Sub
Private Sub XPForm1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
'拖动窗体
If Button = 1 Then
ReleaseCapture
SendMessage Me.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&
Else
'这里可以添加弹出菜单的语句
End If
End Sub
Private Sub Form_Resize()
XPForm1.Width = Me.Width
XPForm1.Height = Me.Height
XPForm1.Nomin '屏蔽最小化按钮(如果你不想有最小化按钮)
BSE1.SchemeStyle = 0
BSE1.EndSubClassing
BSE1.InitSubClassing
End Sub
Private Sub XPForm1_CloseClick()
'关闭按钮的事件
Unload Me
End Sub
Private Sub XPForm1_MinClick()
'最小化按钮的事件
Me.WindowState = 1
End Sub
Sub balance()
Dim strSQL As String
strSQL = "select * from qtxx"
If RunSQL(strSQL) = True Then
Do While Not rctrecordset.EOF
Combo2.AddItem (rctrecordset.Fields("消费备注").Value)
rctrecordset.MoveNext
Loop
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -