📄 form8.frm
字号:
Top = 1620
Width = 1335
_ExtentX = 2355
_ExtentY = 556
_Version = 393216
Format = 61276161
CurrentDate = 38950
End
Begin VB.CheckBox Check1
BackColor = &H00E7F7FF&
Caption = "此会员卡的有效日期到"
Height = 195
Left = 3660
TabIndex = 21
Top = 1680
Width = 2295
End
Begin VB.TextBox Text2
Height = 315
Left = 1560
TabIndex = 20
Text = "0.00"
Top = 1620
Width = 1875
End
Begin VB.ComboBox Combo4
Height = 300
Left = 7800
TabIndex = 18
Text = "可用"
Top = 1200
Width = 1935
End
Begin VB.ComboBox Combo3
Height = 300
Left = 1560
TabIndex = 17
Text = "不优惠"
Top = 1200
Width = 1875
End
Begin VB.ComboBox Combo2
Height = 300
Left = 1560
TabIndex = 16
Text = "普通会员"
Top = 780
Width = 1875
End
Begin VB.ComboBox Combo1
Height = 300
Left = 7800
TabIndex = 15
Text = "1.储存卡"
Top = 360
Width = 1875
End
Begin VB.TextBox Text8
Enabled = 0 'False
Height = 315
Left = 4620
TabIndex = 14
Text = "0"
Top = 1200
Width = 1875
End
Begin VB.TextBox Text6
Height = 315
IMEMode = 3 'DISABLE
Left = 7800
PasswordChar = "*"
TabIndex = 13
Top = 780
Width = 1875
End
Begin VB.TextBox Text4
Height = 315
IMEMode = 3 'DISABLE
Left = 4620
PasswordChar = "*"
TabIndex = 12
Top = 780
Width = 1875
End
Begin VB.TextBox Text3
Height = 315
Left = 4620
TabIndex = 11
Top = 360
Width = 1875
End
Begin VB.TextBox Text1
Height = 315
Left = 1560
TabIndex = 10
Top = 360
Width = 1815
End
Begin VB.Label Label29
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "6位"
ForeColor = &H000000FF&
Height = 180
Left = 9720
TabIndex = 66
Top = 840
Width = 270
End
Begin VB.Label Label26
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "元"
Height = 180
Left = 9480
TabIndex = 63
Top = 1680
Width = 180
End
Begin VB.Label Label25
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "卡费"
Height = 180
Left = 7200
TabIndex = 61
Top = 1680
Width = 360
End
Begin VB.Label Label11
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "备注(F2):"
Height = 180
Left = 3660
TabIndex = 24
Top = 2220
Width = 900
End
Begin VB.Label Label10
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "开户金额:"
ForeColor = &H000000FF&
Height = 180
Left = 600
TabIndex = 19
Top = 1680
Width = 900
End
Begin VB.Label Label9
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "当前状态:"
Height = 180
Left = 6840
TabIndex = 9
Top = 1260
Width = 900
End
Begin VB.Label Label8
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "会员积分:"
Height = 180
Left = 3660
TabIndex = 8
Top = 1260
Width = 900
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "优惠方式:"
Height = 180
Left = 600
TabIndex = 7
Top = 1260
Width = 900
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "确认密码:"
ForeColor = &H000000FF&
Height = 180
Left = 6840
TabIndex = 6
Top = 840
Width = 900
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "会员密码:"
ForeColor = &H000000FF&
Height = 180
Left = 3660
TabIndex = 5
Top = 840
Width = 900
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "卡的级别:"
Height = 180
Left = 600
TabIndex = 4
Top = 840
Width = 900
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "会员卡类型:"
Height = 180
Left = 6660
TabIndex = 3
Top = 420
Width = 1080
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "会员姓名:"
ForeColor = &H000000FF&
Height = 180
Left = 3660
TabIndex = 2
Top = 420
Width = 900
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "会员卡号:"
ForeColor = &H000000FF&
Height = 180
Left = 600
TabIndex = 1
Top = 420
Width = 900
End
End
Begin XP_Form.XPForm XPForm1
Height = 7815
Left = 0
TabIndex = 59
Top = 0
Width = 10455
_ExtentX = 18441
_ExtentY = 13785
BackColor = 2022020
Caption = "会员信息录入-红色区域必须填写--不填写请用0表示"
End
Begin VB.Label Label27
Caption = "不填写用0表示"
ForeColor = &H000000FF&
Height = 375
Left = 360
TabIndex = 64
Top = 7200
Width = 2415
End
End
Attribute VB_Name = "Form8"
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 Command6_Click()
On Error GoTo aa
Dim strSQL As String
strSQL = "INSERT INTO hyxx (会员卡号,会员姓名,性别,出生日期,单位职业,用户手机,用户电话,电子邮件,证件类型,证件号码,联系地址,其他信息,会员卡类型,卡的级别,会员积分,加入日期,卡号密码,卡内金额,会员金额,会员状态) VALUES ('" & Trim(Text1.Text) & "','" & Trim(Text3.Text) & "','" & Trim(Combo5.Text) & "','" & Trim(DTPicker2.Value) & "','" & Trim(Text7.Text) & "','" & Trim(Text9.Text) & "','" & Trim(Text10.Text) & "','" & Trim(Text11.Text) & "','" & Trim(Text12.Text) & "','" & Trim(Text13.Text) & "','" & Trim(Text14.Text) & "','" & Trim(Text15.Text) & "','" & Trim(Combo1.Text) & "','" & Trim(Combo2.Text) & "','" & Trim(Text8.Text) & "','" & Trim(DTPicker3.Value) & "','" & Trim(Text6.Text) & "','" & Trim(Text2.Text) & "','" & Trim(Text18.Text) & "','" & Trim(Combo4.Text) & "')"
If RunSQL(strSQL) = True Then
Dim lstitem As ListItem
Dim aa As Long
'@@IDENTITY是T-SQL中的全局变量,用来取得上一个插入的IDENTITY值
Call RunSQL("SELECT @@IDENTITY AS ABC")
aa = rctrecordset.Fields("ABC").Value
strSQL = "INSERT INTO CUSTOMER (卡号,xiaofeiriqi,beizhu,xiaofeicishu) values ('" & Trim(Text1.Text) & "','" & Trim(DTPicker3.Value) & "','" & Trim(Label25.caption) & "','" & Trim(Text18.Text) & "')"
If RunSQL(strSQL) = True Then
Unload Me
Form3.listlogin
End If
End If
aa:
Select Case Err.Number
Case 3021
MsgBox "当前没有记录", , "系统提示"
End Select
End Sub
Private Sub Command7_Click()
Unload Me
End Sub
Private Sub DTPicker4_CallbackKeyDown(ByVal KeyCode As Integer, ByVal Shift As Integer, ByVal CallbackField As String, CallbackDate As Date)
End Sub
Private Sub Form_Load()
DTPicker3.Value = Format(Date, "yyyy-mm-dd")
DTPicker2.Value = Format(Date, "yyyy-mm-dd")
Combo1.AddItem "1.储存卡"
Combo1.AddItem "2.记次卡"
Combo1.AddItem "3.折扣卡"
Combo2.AddItem "普通会员"
Combo2.AddItem "中级会员"
Combo2.AddItem "高级会员"
Combo3.AddItem "储存优惠"
Combo3.AddItem "消费转现金"
Combo3.AddItem "不优惠"
'Combo5的性别设置
Combo5.AddItem "男"
Combo5.AddItem "女"
'设置窗体集中
Form8.Top = (MDIForm1.ScaleHeight - Form8.Height) / 2
Form8.Left = (MDIForm1.ScaleWidth - Form8.Width) / 2
'设置窗体外观
XPForm1.BackColor = Me.BackColor
'设置按钮外观
BSE1.SchemeStyle = 0
BSE1.EndSubClassing
BSE1.InitSubClassing
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii >= 48 And KeyAscii <= 57 Then
ElseIf KeyAscii = 8 Then
KeyAscii = 8
Else
KeyAscii = 0
End If
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 Text6_KeyPress(KeyAscii As Integer)
If KeyAscii >= 48 And KeyAscii <= 57 Then
ElseIf KeyAscii = 8 Then
KeyAscii = 8
Else
KeyAscii = 0
End If
End Sub
Private Sub Text9_KeyPress(KeyAscii As Integer)
If KeyAscii >= 48 And KeyAscii <= 57 Then
ElseIf KeyAscii = 8 Then
KeyAscii = 8
Else
KeyAscii = 0
End If
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 '屏蔽最小化按钮(如果你不想有最小化按钮)
End Sub
Private Sub XPForm1_CloseClick()
'关闭按钮的事件
Unload Me
End Sub
Private Sub XPForm1_MinClick()
'最小化按钮的事件
Me.WindowState = 1
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -