⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmreg.frm

📁 This article introduces how to construct a Hospital Ward Information System with three-tiered techno
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmReg 
   Caption         =   "注册"
   ClientHeight    =   5175
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7020
   Icon            =   "frmReg.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   5175
   ScaleWidth      =   7020
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton cmdCancel 
      Cancel          =   -1  'True
      Caption         =   "取消"
      Height          =   495
      Left            =   5400
      TabIndex        =   21
      Top             =   4440
      Width           =   1215
   End
   Begin VB.CommandButton cmdSubmit 
      Caption         =   "提交"
      Default         =   -1  'True
      Height          =   495
      Left            =   3960
      TabIndex        =   20
      Top             =   4440
      Width           =   1215
   End
   Begin VB.Frame Frame1 
      Caption         =   "注册用户信息(***必填)"
      Height          =   3735
      Left            =   240
      TabIndex        =   1
      Top             =   480
      Width           =   6495
      Begin VB.TextBox txtNickName 
         Height          =   270
         Left            =   4440
         MaxLength       =   20
         TabIndex        =   27
         Top             =   1080
         Width           =   1335
      End
      Begin VB.TextBox txtIntroduce 
         Height          =   1575
         Left            =   3840
         MaxLength       =   200
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   19
         Top             =   1800
         Width           =   2415
      End
      Begin VB.TextBox txtAddress 
         Height          =   615
         Left            =   1080
         MaxLength       =   100
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   17
         Top             =   2760
         Width           =   2295
      End
      Begin VB.TextBox txtEmail 
         Height          =   270
         Left            =   1080
         MaxLength       =   50
         TabIndex        =   15
         Top             =   2280
         Width           =   2295
      End
      Begin VB.ComboBox cmbSex 
         Height          =   300
         Left            =   2520
         TabIndex        =   13
         Text            =   "男"
         Top             =   1800
         Width           =   855
      End
      Begin VB.TextBox txtAge 
         Height          =   270
         Left            =   1080
         MaxLength       =   3
         TabIndex        =   11
         Top             =   1800
         Width           =   495
      End
      Begin MSComCtl2.UpDown udSelect 
         Height          =   375
         Left            =   5520
         TabIndex        =   9
         Top             =   360
         Width           =   270
         _ExtentX        =   476
         _ExtentY        =   661
         _Version        =   393216
         Value           =   1
         Max             =   5
         Min             =   1
         Enabled         =   -1  'True
      End
      Begin VB.TextBox txtPwdAgain 
         Height          =   270
         IMEMode         =   3  'DISABLE
         Left            =   1080
         MaxLength       =   20
         PasswordChar    =   "*"
         TabIndex        =   7
         Top             =   1320
         Width           =   2295
      End
      Begin VB.TextBox txtPwd 
         Height          =   270
         IMEMode         =   3  'DISABLE
         Left            =   1080
         MaxLength       =   20
         PasswordChar    =   "*"
         TabIndex        =   5
         Top             =   840
         Width           =   2295
      End
      Begin VB.TextBox txtName 
         Height          =   270
         Left            =   1080
         MaxLength       =   20
         TabIndex        =   3
         Top             =   360
         Width           =   2295
      End
      Begin VB.Label Label13 
         Caption         =   "***"
         Height          =   135
         Index           =   4
         Left            =   5880
         TabIndex        =   28
         Top             =   1080
         Width           =   255
      End
      Begin VB.Label Label14 
         Caption         =   "昵称:"
         Height          =   255
         Left            =   3840
         TabIndex        =   26
         Top             =   1080
         Width           =   615
      End
      Begin VB.Label Label13 
         Caption         =   "***"
         Height          =   135
         Index           =   3
         Left            =   5880
         TabIndex        =   25
         Top             =   360
         Width           =   255
      End
      Begin VB.Label Label13 
         Caption         =   "***"
         Height          =   135
         Index           =   2
         Left            =   3360
         TabIndex        =   24
         Top             =   1440
         Width           =   255
      End
      Begin VB.Label Label13 
         Caption         =   "***"
         Height          =   135
         Index           =   1
         Left            =   3360
         TabIndex        =   23
         Top             =   960
         Width           =   255
      End
      Begin VB.Label Label13 
         Caption         =   "***"
         Height          =   135
         Index           =   0
         Left            =   3360
         TabIndex        =   22
         Top             =   360
         Width           =   255
      End
      Begin VB.Label Label12 
         Caption         =   "自我介绍:"
         Height          =   255
         Left            =   3840
         TabIndex        =   18
         Top             =   1440
         Width           =   1215
      End
      Begin VB.Label Label11 
         Caption         =   "地址:"
         Height          =   255
         Left            =   240
         TabIndex        =   16
         Top             =   2760
         Width           =   735
      End
      Begin VB.Label Label10 
         Caption         =   "Email:"
         Height          =   255
         Left            =   240
         TabIndex        =   14
         Top             =   2280
         Width           =   735
      End
      Begin VB.Label Label9 
         Caption         =   "性别:"
         Height          =   255
         Left            =   1920
         TabIndex        =   12
         Top             =   1800
         Width           =   615
      End
      Begin VB.Label Label8 
         Caption         =   "年龄:"
         Height          =   375
         Left            =   240
         TabIndex        =   10
         Top             =   1800
         Width           =   615
      End
      Begin VB.Image imgSelect 
         Height          =   495
         Left            =   4680
         Top             =   360
         Width           =   735
      End
      Begin VB.Label Label7 
         Caption         =   "头像:"
         Height          =   255
         Left            =   3840
         TabIndex        =   8
         Top             =   360
         Width           =   855
      End
      Begin VB.Label Label6 
         Caption         =   "密码确认:"
         Height          =   255
         Left            =   240
         TabIndex        =   6
         Top             =   1320
         Width           =   1095
      End
      Begin VB.Label Label5 
         Caption         =   "密码:"
         Height          =   255
         Left            =   240
         TabIndex        =   4
         Top             =   840
         Width           =   615
      End
      Begin VB.Label Label4 
         Caption         =   "用户名:"
         Height          =   255
         Left            =   240
         TabIndex        =   2
         Top             =   360
         Width           =   735
      End
   End
   Begin VB.Label Label1 
      Caption         =   "欢迎你注册称为QICQ的新用户!"
      Height          =   255
      Left            =   2040
      TabIndex        =   0
      Top             =   120
      Width           =   3015
   End
End
Attribute VB_Name = "frmReg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit


Private Sub cmdCancel_Click()
 Unload Me
End Sub

Private Sub cmdSubmit_Click()
    '检验数据的正确性
    If txtName.Text = "" Then
        MsgBox "请填写用户名!", vbInformation, "注册"
        txtName.SetFocus
        Exit Sub
    ElseIf txtPwd.Text = "" Then
        MsgBox "请填写密码!", vbInformation, "注册"
        txtPwd.SetFocus
        Exit Sub
    ElseIf txtPwdAgain.Text = "" Then
        MsgBox "请填写确认密码!", vbInformation, "注册"
        txtPwdAgain.SetFocus
        Exit Sub
    ElseIf txtPwd.Text <> txtPwdAgain.Text Then
        MsgBox "密码不一致!", vbInformation, "注册"
        txtPwd.Text = ""
        txtPwdAgain.Text = ""
        txtPwd.SetFocus
        Exit Sub
    ElseIf txtNickName.Text = "" Then
        MsgBox "请填写昵称!", vbInformation, "注册"
        txtNickName.SetFocus
        Exit Sub
    ElseIf txtAge.Text <> "" And Not IsNumeric(txtAge.Text) Then
        MsgBox "请正确填写年龄!", vbInformation, "注册"
        txtAge.SetFocus
        Exit Sub
    End If
    
    
    g_strName = txtName.Text
    g_strPwd = txtPwd.Text
    g_selfName = g_strName
    g_selfPwd = g_strPwd
    g_intImg = udSelect.Value
    If txtAge.Text <> "" Then
        g_intAge = Int(txtAge.Text)
    End If
    g_intSex = cmbSex.ListIndex
    g_strEmail = txtEmail.Text
    g_strAddress = txtAddress.Text
    g_strIntroduce = txtIntroduce.Text
    g_strNickName = txtNickName.Text
    
    '注册
    frmClient.wskClient.SendData "QICQREG" + g_strName + "QICQREG" + g_strPwd + "QICQREG" + g_strNickName + "QICQREG" + CStr(g_intImg) + "QICQREG" + CStr(g_intAge) _
                           + "QICQREG" + CStr(g_intSex) + "QICQREG" + g_strEmail + "QICQREG" + g_strAddress + "QICQREG" + g_strIntroduce + "QICQREG"
End Sub

Private Sub Form_Load()
    '界面
    cmbSex.AddItem "男"
    cmbSex.AddItem "女"
    cmbSex.AddItem "不告诉你"
    cmbSex.ListIndex = 0
    '显示图片
    udSelect_Change
        
    g_Control = REGCONTROL
End Sub

Private Sub udSelect_Change()
    '选择图片
    imgSelect.Picture = LoadPicture(App.Path + "\ico\" + CStr(udSelect.Value) + ".ico")
End Sub

⌨️ 快捷键说明

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