Frmdenlu.frm
上传用户:bubble
上传日期:2007-03-02
资源大小:403k
文件大小:6k
源码类别:

教育系统应用

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Begin VB.Form Frmdenlu 
  3.    Caption         =   "登录"
  4.    ClientHeight    =   2670
  5.    ClientLeft      =   3360
  6.    ClientTop       =   2880
  7.    ClientWidth     =   4725
  8.    Icon            =   "Frmdenlu.frx":0000
  9.    LinkTopic       =   "Form2"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   2670
  13.    ScaleWidth      =   4725
  14.    StartUpPosition =   2  '屏幕中心
  15.    Begin VB.CommandButton Command2 
  16.       Height          =   300
  17.       Left            =   3480
  18.       Picture         =   "Frmdenlu.frx":0442
  19.       Style           =   1  'Graphical
  20.       TabIndex        =   6
  21.       Top             =   2280
  22.       Width           =   1095
  23.    End
  24.    Begin VB.CommandButton Command1 
  25.       Height          =   300
  26.       Left            =   2160
  27.       Picture         =   "Frmdenlu.frx":099D
  28.       Style           =   1  'Graphical
  29.       TabIndex        =   5
  30.       Top             =   2280
  31.       Width           =   1095
  32.    End
  33.    Begin VB.Frame Frame1 
  34.       Appearance      =   0  'Flat
  35.       BackColor       =   &H00C0C0C0&
  36.       ForeColor       =   &H80000008&
  37.       Height          =   1575
  38.       Left            =   120
  39.       TabIndex        =   0
  40.       Top             =   600
  41.       Width           =   4455
  42.       Begin VB.TextBox Text2 
  43.          Appearance      =   0  'Flat
  44.          BackColor       =   &H80000018&
  45.          BeginProperty Font 
  46.             Name            =   "宋体"
  47.             Size            =   10.5
  48.             Charset         =   134
  49.             Weight          =   400
  50.             Underline       =   0   'False
  51.             Italic          =   0   'False
  52.             Strikethrough   =   0   'False
  53.          EndProperty
  54.          ForeColor       =   &H000000FF&
  55.          Height          =   350
  56.          IMEMode         =   3  'DISABLE
  57.          Left            =   1320
  58.          PasswordChar    =   "*"
  59.          TabIndex        =   4
  60.          Top             =   960
  61.          Width           =   2055
  62.       End
  63.       Begin VB.TextBox Text1 
  64.          Appearance      =   0  'Flat
  65.          BackColor       =   &H80000018&
  66.          BeginProperty Font 
  67.             Name            =   "宋体"
  68.             Size            =   10.5
  69.             Charset         =   134
  70.             Weight          =   400
  71.             Underline       =   0   'False
  72.             Italic          =   0   'False
  73.             Strikethrough   =   0   'False
  74.          EndProperty
  75.          ForeColor       =   &H000000FF&
  76.          Height          =   350
  77.          Left            =   1320
  78.          TabIndex        =   2
  79.          Top             =   360
  80.          Width           =   2055
  81.       End
  82.       Begin VB.Image Image3 
  83.          Height          =   480
  84.          Left            =   3600
  85.          Picture         =   "Frmdenlu.frx":0F74
  86.          Top             =   840
  87.          Width           =   480
  88.       End
  89.       Begin VB.Image Image2 
  90.          Height          =   480
  91.          Left            =   3600
  92.          Picture         =   "Frmdenlu.frx":13B6
  93.          Top             =   360
  94.          Width           =   480
  95.       End
  96.       Begin VB.Label Label2 
  97.          Caption         =   "密码:"
  98.          BeginProperty Font 
  99.             Name            =   "宋体"
  100.             Size            =   12
  101.             Charset         =   134
  102.             Weight          =   400
  103.             Underline       =   0   'False
  104.             Italic          =   0   'False
  105.             Strikethrough   =   0   'False
  106.          EndProperty
  107.          ForeColor       =   &H00C00000&
  108.          Height          =   255
  109.          Left            =   240
  110.          TabIndex        =   3
  111.          Top             =   960
  112.          Width           =   975
  113.       End
  114.       Begin VB.Label Label1 
  115.          Caption         =   "用户名:"
  116.          BeginProperty Font 
  117.             Name            =   "宋体"
  118.             Size            =   12
  119.             Charset         =   134
  120.             Weight          =   400
  121.             Underline       =   0   'False
  122.             Italic          =   0   'False
  123.             Strikethrough   =   0   'False
  124.          EndProperty
  125.          ForeColor       =   &H00C00000&
  126.          Height          =   255
  127.          Left            =   240
  128.          TabIndex        =   1
  129.          Top             =   360
  130.          Width           =   975
  131.       End
  132.    End
  133.    Begin VB.Image Image4 
  134.       Height          =   480
  135.       Left            =   480
  136.       Picture         =   "Frmdenlu.frx":17F8
  137.       Top             =   2160
  138.       Width           =   480
  139.    End
  140.    Begin VB.Image Image1 
  141.       Height          =   480
  142.       Left            =   360
  143.       Picture         =   "Frmdenlu.frx":1C3A
  144.       Top             =   120
  145.       Width           =   480
  146.    End
  147.    Begin VB.Label Label3 
  148.       Caption         =   "某某学校"
  149.       BeginProperty Font 
  150.          Name            =   "楷体_GB2312"
  151.          Size            =   15.75
  152.          Charset         =   134
  153.          Weight          =   400
  154.          Underline       =   0   'False
  155.          Italic          =   0   'False
  156.          Strikethrough   =   0   'False
  157.       EndProperty
  158.       ForeColor       =   &H000000FF&
  159.       Height          =   375
  160.       Left            =   1680
  161.       TabIndex        =   7
  162.       Top             =   120
  163.       Width           =   1575
  164.    End
  165. End
  166. Attribute VB_Name = "Frmdenlu"
  167. Attribute VB_GlobalNameSpace = False
  168. Attribute VB_Creatable = False
  169. Attribute VB_PredeclaredId = True
  170. Attribute VB_Exposed = False
  171. Private Sub Command1_Click()
  172. Dim mrc As ADODB.Recordset
  173. txtsql = "select username from use where username='" & Trim(Text1.Text) & "'"
  174. Set mrc = ExecuteSQL(txtsql)
  175. If mrc.EOF = True Then
  176.   MsgBox " 用户名错误!", vbExclamation + vbOKOnly, "警告"
  177.   Text1.SetFocus
  178.   Text1.SelStart = 0
  179.   Text1.SelLength = Len(Text1.Text)
  180.   Exit Sub
  181. End If
  182. username = mrc.Fields(0)
  183. txtsql = "select username from use where password='" & Trim(Text2.Text) & "'"
  184. Set mrc = ExecuteSQL(txtsql)
  185. If mrc.EOF = True Then
  186.   MsgBox " 密码错误!", vbExclamation + vbOKOnly, "警告"
  187.   Text2.SetFocus
  188.   Text2.SelStart = 0
  189.   Text2.SelLength = Len(Text2.Text)
  190.   Exit Sub
  191. End If
  192. MDIForm1.Show
  193. Unload Me
  194. End Sub
  195. Private Sub Command2_Click()
  196. Unload Me
  197. End Sub
  198. Private Sub Text1_KeyPress(KeyAscii As Integer)
  199. If KeyAscii = 13 Then
  200.   Text2.SetFocus
  201. End If
  202. End Sub
  203. Private Sub Text2_KeyPress(KeyAscii As Integer)
  204. If KeyAscii = 13 Then
  205.  Command1.SetFocus
  206. End If
  207. End Sub