form_setpwd.frm

来自「仓库扫描管理系统」· FRM 代码 · 共 79 行

FRM
79
字号
VERSION 5.00
Begin VB.Form form_setPwd 
   BackColor       =   &H00C0FFFF&
   Caption         =   "设置密码"
   ClientHeight    =   4080
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6450
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   ScaleHeight     =   4080
   ScaleWidth      =   6450
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton cmdClose 
      Caption         =   "&C关闭"
      Height          =   375
      Left            =   3480
      TabIndex        =   1
      Top             =   3240
      Width           =   1095
   End
   Begin VB.CommandButton cmdConfirm 
      Caption         =   "&O确定"
      Height          =   375
      Left            =   1080
      TabIndex        =   0
      Top             =   3240
      Width           =   1095
   End
End
Attribute VB_Name = "form_setPwd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdClose_Click()
    Unload Me
End Sub

Private Sub cmdConfirm_Click()
    Dim Index As Integer
    Dim i As Integer
    For i = 1 To 4
        If Option1(i).Value = True Then
            Index = i
            Exit For
        End If
    Next
    g_db.Execute ("update hp_sysParas set paraValue='" + CStr(Index) + "' WHERE paraCode='barcodeFormat'")
    ' 设置条码格式
    setBarcodeFarmat
    MsgBox "设置成功!", vbInformation, "提示"
    Exit Sub
End Sub

Private Sub Form_Load()
    Me.Left = (Screen.Width - Me.Width) / 2
    Me.Top = (Screen.Height - Me.Height) / 2
    
    Dim intBarcodeFormat As Integer
    Dim rsBCFormat As Recordset
    Set rsBCFormat = g_db.OpenRecordset("SELECT paraValue FROM hp_sysParas WHERE paraCode='barcodeFormat'")
    If rsBCFormat.RecordCount <> 1 Then
        MsgBox "设置条形码格式出错,请与管理员联系!", vbInformation, "提示"
        End
    Else
        intBarcodeFormat = CInt(rsBCFormat.Fields("paraValue"))
    End If
    If intBarcodeFormat > 0 And intBarcodeFormat < 5 Then
        Option1(intBarcodeFormat).Value = True
    End If
End Sub

Private Sub Form_Unload(Cancel As Integer)
    frm_main.Enabled = True
End Sub

⌨️ 快捷键说明

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