form2.frm

来自「VB 编写的"华成POS管理系统",代码全,没有进行测试,数据库全,有兴趣的朋友」· FRM 代码 · 共 157 行

FRM
157
字号
VERSION 5.00
Begin VB.Form Form2 
   BorderStyle     =   0  'None
   Caption         =   "前台设置"
   ClientHeight    =   3765
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   4905
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3765
   ScaleWidth      =   4905
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.Frame Frame1 
      Height          =   3615
      Left            =   120
      TabIndex        =   1
      Top             =   0
      Width           =   4695
      Begin VB.TextBox Txtfield 
         Height          =   375
         Index           =   4
         Left            =   1560
         TabIndex        =   11
         Top             =   2280
         Width           =   2535
      End
      Begin VB.TextBox Txtfield 
         Height          =   375
         Index           =   3
         Left            =   1560
         TabIndex        =   10
         Top             =   1800
         Width           =   2535
      End
      Begin VB.TextBox Txtfield 
         Height          =   375
         Index           =   2
         Left            =   1560
         TabIndex        =   9
         Top             =   1320
         Width           =   2535
      End
      Begin VB.TextBox Txtfield 
         Height          =   375
         Index           =   1
         Left            =   1560
         TabIndex        =   8
         Top             =   840
         Width           =   2535
      End
      Begin VB.TextBox Txtfield 
         Height          =   375
         Index           =   0
         Left            =   1560
         TabIndex        =   0
         Top             =   360
         Width           =   2535
      End
      Begin VB.Label Label6 
         Caption         =   "钱柜配置文件"
         Height          =   255
         Left            =   360
         TabIndex        =   7
         Top             =   2400
         Width           =   1095
      End
      Begin VB.Label Label5 
         Caption         =   "超市电话"
         Height          =   255
         Left            =   720
         TabIndex        =   6
         Top             =   1920
         Width           =   735
      End
      Begin VB.Label Label4 
         Caption         =   "超市地址"
         Height          =   255
         Left            =   720
         TabIndex        =   5
         Top             =   1440
         Width           =   735
      End
      Begin VB.Label Label3 
         Caption         =   "超市名称"
         Height          =   255
         Left            =   720
         TabIndex        =   4
         Top             =   960
         Width           =   735
      End
      Begin VB.Label Label2 
         Caption         =   "POS编号"
         Height          =   255
         Left            =   720
         TabIndex        =   3
         Top             =   480
         Width           =   735
      End
      Begin VB.Label Label1 
         Caption         =   "ESC退出  F5保存设置   Enter换行"
         Height          =   255
         Left            =   600
         TabIndex        =   2
         Top             =   3120
         Width           =   3735
      End
   End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case 27
Unload Me


Case 40 '向下

Case 116 '保存设置
If Trim(txtfield(0).Text) <> "" Then
SavePos txtfield(0).Text, txtfield(1).Text, txtfield(2).Text, txtfield(3).Text, txtfield(4).Text
For i = 0 To 4
txtfield(i) = ""
Next i
Unload Me
MsgBox "成功保存信息!"
End If

End Select
End Sub

Private Sub txtField_KeyPress(Index As Integer, KeyAscii As Integer)

 If KeyAscii = 13 Then
    '自动下跳
     If Index < 4 Then                    '最后一个文本框
        txtfield(Index + 1).SetFocus
       Else
        txtfield(0).SetFocus               '返回
     End If
     Exit Sub
 End If
     
'判断是否为正确输入
 
         
 
 
End Sub

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?