dialog2.frm

来自「一个网带烧结炉的程序,串口通讯,做工业自动化的可以参考」· FRM 代码 · 共 199 行

FRM
199
字号
VERSION 5.00
Begin VB.Form Dialog2 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "添加用户"
   ClientHeight    =   3195
   ClientLeft      =   4485
   ClientTop       =   4590
   ClientWidth     =   6030
   Icon            =   "Dialog2.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Moveable        =   0   'False
   ScaleHeight     =   3195
   ScaleWidth      =   6030
   ShowInTaskbar   =   0   'False
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   3960
      TabIndex        =   9
      Top             =   480
      Width           =   1695
   End
   Begin VB.OptionButton Option2 
      Height          =   255
      Left            =   1890
      TabIndex        =   5
      Top             =   1650
      Visible         =   0   'False
      Width           =   615
   End
   Begin VB.OptionButton Option1 
      Height          =   255
      Left            =   1920
      TabIndex        =   4
      Top             =   1320
      Value           =   -1  'True
      Visible         =   0   'False
      Width           =   495
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   1800
      TabIndex        =   2
      Top             =   480
      Width           =   1095
   End
   Begin VB.CommandButton CancelButton 
      Caption         =   "取消"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3960
      TabIndex        =   1
      Top             =   1920
      Width           =   1215
   End
   Begin VB.CommandButton OKButton 
      Caption         =   "确定"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   960
      TabIndex        =   0
      Top             =   1950
      Width           =   1215
   End
   Begin VB.Label Label4 
      Caption         =   "密码"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3120
      TabIndex        =   8
      Top             =   480
      Width           =   855
   End
   Begin VB.Label Label3 
      Caption         =   "操作员组"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2640
      TabIndex        =   7
      Top             =   1800
      Visible         =   0   'False
      Width           =   1575
   End
   Begin VB.Label Label2 
      Caption         =   "管理员组"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2640
      TabIndex        =   6
      Top             =   1320
      Visible         =   0   'False
      Width           =   1575
   End
   Begin VB.Label Label1 
      Caption         =   "用户名"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   600
      TabIndex        =   3
      Top             =   480
      Width           =   855
   End
End
Attribute VB_Name = "Dialog2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit

Private Sub CancelButton_Click()
Unload Me
End Sub

Private Sub Form_Load()
'SetTopMostWindow hwnd, True
End Sub

Private Sub OKButton_Click()
Dim i As Integer
'Dim filename As String
If Text1 <> "" Then
    If Option1.Value = True Then
        For i = 7 To 0 Step i - 1
            mainuser(i + 1) = mainuser(i)
        Next i
        mainuser(0).username = Text1
        mainuser(0).password = Text2
        mainuser(0).dj = 1
    Else
        For i = 7 To 0 Step i - 1
            ptuser(i + 1) = ptuser(i)
        Next i
        ptuser(0).username = Text1
        ptuser(0).password = Text2
        ptuser(0).dj = 0
   End If
End If
'filename = App.Path + "\abc.pss"
Open App.Path + "\abc.pss" For Random As #1
For i = 0 To 8
Put #1, , mainuser(i)
Put #1, , ptuser(i)
Next i
Close #1
Unload Me
End Sub

⌨️ 快捷键说明

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