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

📄 todaylab.frm

📁 this is a simple login form
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form2 
   Caption         =   "mag"
   ClientHeight    =   5505
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5490
   LinkTopic       =   "Form2"
   ScaleHeight     =   5505
   ScaleWidth      =   5490
   StartUpPosition =   3  'Windows Default
   Begin VB.Frame Frame2 
      Caption         =   "Personal Information"
      Height          =   2175
      Left            =   120
      TabIndex        =   11
      Top             =   3240
      Width           =   5295
      Begin VB.TextBox Text10 
         Height          =   285
         Left            =   1200
         TabIndex        =   20
         Top             =   1320
         Width           =   1935
      End
      Begin VB.TextBox Text9 
         Height          =   285
         Left            =   1200
         TabIndex        =   19
         Top             =   960
         Width           =   1935
      End
      Begin VB.TextBox Text8 
         Height          =   285
         Left            =   1200
         TabIndex        =   18
         Top             =   600
         Width           =   1935
      End
      Begin VB.TextBox Text7 
         Height          =   285
         Left            =   1200
         MultiLine       =   -1  'True
         TabIndex        =   17
         Top             =   240
         Width           =   1935
      End
      Begin VB.CommandButton Command1 
         Caption         =   "Register"
         Height          =   375
         Left            =   1560
         TabIndex        =   12
         Top             =   1680
         Width           =   975
      End
      Begin VB.Label Label11 
         Alignment       =   1  'Right Justify
         Caption         =   "Email ID"
         Height          =   255
         Left            =   120
         TabIndex        =   16
         Top             =   1320
         Width           =   855
      End
      Begin VB.Label Label10 
         Alignment       =   1  'Right Justify
         Caption         =   "Mobile No."
         Height          =   255
         Left            =   120
         TabIndex        =   15
         Top             =   960
         Width           =   855
      End
      Begin VB.Label Label9 
         Alignment       =   1  'Right Justify
         Caption         =   "Phone No."
         Height          =   255
         Left            =   120
         TabIndex        =   14
         Top             =   600
         Width           =   855
      End
      Begin VB.Label Label8 
         Alignment       =   1  'Right Justify
         Caption         =   "Address"
         Height          =   255
         Left            =   120
         TabIndex        =   13
         Top             =   240
         Width           =   855
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "Identification"
      Height          =   2415
      Left            =   120
      TabIndex        =   1
      Top             =   720
      Width           =   5295
      Begin VB.ComboBox Combo1 
         Height          =   315
         ItemData        =   "todaylab.frx":0000
         Left            =   1200
         List            =   "todaylab.frx":000A
         TabIndex        =   21
         Top             =   1680
         Width           =   1935
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Left            =   1200
         TabIndex        =   5
         Top             =   240
         Width           =   1935
      End
      Begin VB.TextBox Text2 
         Height          =   285
         Left            =   1200
         TabIndex        =   4
         Top             =   600
         Width           =   1935
      End
      Begin VB.TextBox Text3 
         Height          =   285
         Left            =   1200
         TabIndex        =   3
         Top             =   960
         Width           =   1935
      End
      Begin VB.TextBox Text4 
         Height          =   285
         IMEMode         =   3  'DISABLE
         Left            =   1200
         PasswordChar    =   "*"
         TabIndex        =   2
         Top             =   1320
         Width           =   1935
      End
      Begin VB.Label Label7 
         Alignment       =   1  'Right Justify
         Caption         =   "Permission"
         Height          =   255
         Left            =   240
         TabIndex        =   10
         Top             =   1680
         Width           =   855
      End
      Begin VB.Label Label2 
         Alignment       =   1  'Right Justify
         Caption         =   "First Name"
         Height          =   255
         Left            =   240
         TabIndex        =   9
         Top             =   240
         Width           =   855
      End
      Begin VB.Label Label3 
         Alignment       =   1  'Right Justify
         Caption         =   "Last Name"
         Height          =   255
         Left            =   240
         TabIndex        =   8
         Top             =   600
         Width           =   855
      End
      Begin VB.Label Label5 
         Alignment       =   1  'Right Justify
         Caption         =   "User Name"
         Height          =   255
         Left            =   240
         TabIndex        =   7
         Top             =   960
         Width           =   855
      End
      Begin VB.Label Label6 
         Alignment       =   1  'Right Justify
         Caption         =   "Password"
         Height          =   255
         Left            =   240
         TabIndex        =   6
         Top             =   1320
         Width           =   855
      End
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "Registration Form"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1440
      TabIndex        =   0
      Top             =   120
      Width           =   2295
   End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim a As String
Dim b As String
Dim s As String





a = InStr(Text10.Text, "@")
b = InStr(Text10.Text, ".")

If (Command1.Enabled = False) Then
Command1.Enabled = False
End If



If Text1.Text = "" Then
MsgBox "Enter First Name"
ElseIf Text2.Text = "" Then
MsgBox "Enter Last Name"
ElseIf Text3.Text = "" Then
MsgBox "Enter User Name"
ElseIf InStr(Text3.Text, "@") Then
MsgBox "Can't enter special characters in username"
ElseIf InStr(Text3.Text, "#") Then
MsgBox "Can't enter special characters in username"
ElseIf InStr(Text3.Text, "$") Then
MsgBox "Can't enter special characters in username"
ElseIf InStr(Text3.Text, "!") Then
MsgBox "Can't enter special characters in username"
ElseIf InStr(Text3.Text, "%") Then
MsgBox "Can't enter special characters in username"
ElseIf InStr(Text3.Text, "&") Then
MsgBox "Can't enter special characters in username"
ElseIf InStr(Text3.Text, "*") Then
MsgBox "Can't enter special characters in username"
ElseIf InStr(Text3.Text, "(") Then
MsgBox "Can't enter special characters in username"
ElseIf InStr(Text3.Text, ")") Then
MsgBox "Can't enter special characters in username"
ElseIf InStr(Text3.Text, "/") Then
MsgBox "Can't enter special characters in username"
ElseIf InStr(Text3.Text, "\") Then
MsgBox "Can't enter special characters in username"
ElseIf Text4.Text = "" Then
MsgBox "Enter password"
ElseIf (Len(Text4.Text) < 8) Then
MsgBox "Enter 8 character password"
ElseIf InStr(Text4.Text, "@") Then
MsgBox "Can't enter special characters in Password"
ElseIf InStr(Text4.Text, "#") Then
MsgBox "Can't enter special characters in Password"
ElseIf InStr(Text4.Text, "$") Then
MsgBox "Can't enter special characters in Password"
ElseIf InStr(Text4.Text, "!") Then
MsgBox "Can't enter special characters in Password"
ElseIf InStr(Text4.Text, "%") Then
MsgBox "Can't enter special characters in Password"
ElseIf InStr(Text4.Text, "&") Then
MsgBox "Can't enter special characters in Password"
ElseIf InStr(Text4.Text, "*") Then
MsgBox "Can't enter special characters in Password"
ElseIf InStr(Text4.Text, "(") Then
MsgBox "Can't enter special characters in Password"
ElseIf InStr(Text4.Text, ")") Then
MsgBox "Can't enter special characters in Password"
ElseIf InStr(Text4.Text, "/") Then
MsgBox "Can't enter special characters in Password"
ElseIf InStr(Text4.Text, "\") Then
MsgBox "Can't enter special characters in Password"
ElseIf Text7.Text = "" Then
MsgBox "Enter Address"
ElseIf Text8.Text = "" Then
MsgBox "Enter Phone Number"
ElseIf Not IsNumeric(Text8.Text) Then
MsgBox "Can't enter string and special characters in phone number"
ElseIf Text9.Text = "" Then
MsgBox "Enter Mobile Number"
ElseIf Not IsNumeric(Text9.Text) Then
MsgBox "Can't enter string and special characters in mobile number"
ElseIf Text10.Text = "" Then
MsgBox "Enter EmailID"
ElseIf a = False Then
MsgBox "Enter @ in Email ID"
ElseIf b = False Then
MsgBox "Enter . in Email ID"
Else
MsgBox "You registered Successfully"
Form2.Hide
Form1.Show
End If
End Sub

Private Sub Text5_Change()

End Sub

Private Sub Text6_Change()

End Sub

Private Sub Text1_Change()
Dim s As String
Command1.Enabled = False
s = InStr(Text1.Text, "1")
If s > 0 Then
MsgBox "No numeric allowed"
Command1.Enabled = False
s = InStr(Text1.Text, "2")
ElseIf s > 0 Then
MsgBox "No numeric allowed"
Command1.Enabled = False
s = InStr(Text1.Text, "3")
ElseIf s > 0 Then
MsgBox "No numeric allowed"
Command1.Enabled = False
s = InStr(Text1.Text, "4")
ElseIf s > 0 Then
MsgBox "No numeric allowed"
Command1.Enabled = False
s = InStr(Text1.Text, "5")
ElseIf a > 0 Then
MsgBox "No numeric allowed"
Command1.Enabled = False
s = InStr(Text1.Text, "6")
ElseIf s > 0 Then
MsgBox "No numeric allowed"
Command1.Enabled = False
s = InStr(Text1.Text, "7")
ElseIf s > 0 Then
MsgBox "No numeric allowed"
Command1.Enabled = False
s = InStr(Text1.Text, "8")
ElseIf s > 0 Then
MsgBox "No numeric allowed"
Command1.Enabled = False
s = InStr(Text1.Text, "9")
ElseIf s > 0 Then
MsgBox "No numeric allowed"
Command1.Enabled = False
s = InStr(Text1.Text, "0")
ElseIf s > 0 Then
MsgBox "No numeric allowed"
Command1.Enabled = False

Else
Text1.SetFocus
Command1.Enabled = True
End If
End Sub

Private Sub Text2_Change()
Command1.Enabled = False
s = InStr(Text2.Text, "1")
If s > 0 Then
MsgBox "No numeric allowed"
Command1.Enabled = False
s = InStr(Text2.Text, "2")
ElseIf s > 0 Then
MsgBox "No numeric allowed"
Command1.Enabled = False
s = InStr(Text2.Text, "3")
ElseIf s > 0 Then
MsgBox "No numeric allowed"
Command1.Enabled = False
s = InStr(Text2.Text, "4")
ElseIf s > 0 Then
MsgBox "No numeric allowed"
Command1.Enabled = False
s = InStr(Text2.Text, "5")
ElseIf s > 0 Then
MsgBox "No numeric allowed"
Command1.Enabled = False
s = InStr(Text2.Text, "6")
ElseIf s > 0 Then
MsgBox "No numeric allowed"
Command1.Enabled = False
s = InStr(Text2.Text, "7")
ElseIf s > 0 Then
MsgBox "No numeric allowed"
Command1.Enabled = False
s = InStr(Text2.Text, "8")
ElseIf s > 0 Then
MsgBox "No numeric allowed"
Command1.Enabled = False
s = InStr(Text2.Text, "9")
ElseIf s > 0 Then
MsgBox "No numeric allowed"
Command1.Enabled = False
s = InStr(Text2.Text, "0")
ElseIf s > 0 Then
MsgBox "No numeric allowed"
Command1.Enabled = False
Else
Text2.SetFocus
Command1.Enabled = True
End If
End Sub

⌨️ 快捷键说明

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