【正文】
.ColWidth(0) = 0 .ColWidth(1) = 1550 .ColWidth(2) = 1550 .ColWidth(3) = 1550 .ColWidth(4) = 1550 .ColWidth(5) = 1550 .Rows = 1 End With Text1(0) = GetRkno End Sub Private Sub MSFlexGrid1_Click() Dim txtSQL As String If 0 Then Text3(0) = (, 0) Text3(1) = (, 1) Combo3(0).Clear Combo3(0).AddItem (, 2) 33 Combo3(0).ListIndex = 0 txtSQL = select * from class_Form Set mrc = ExecuteSQL(txtSQL, MsgText) If = False Then With Combo3(0) Do While Not If mrc!class_NO .Text Then 。 Frmscoi 窗口的界面設(shè)計(jì)示意圖如下 . Frmscoi 窗體包含的主要控件及其屬性如下: 對(duì)象名 屬性 屬性值 Combo1( 0) Caption 學(xué)生班號(hào) Label Caption 考試期號(hào) 32 Option1( 0) Caption 添加 MSFlexGrid1 BorderStyle 1 – flexBorderSingle Picture1( 0) DrawMode 13 – Copy Pen ProgressBar1 Orientation ccOrientationHorizontal Command1 Caption 添加 Command2 Caption 取消 其他控件以及屬性跟上面的表中的類似。 39。 amp。 Set mrc = ExecuteSQL(txtSQL, MsgText) If = False Then MsgBox 此用戶已經(jīng)存在 !, vbOKOnly, 警告 Text1(0).SetFocus Exit Sub End If txtSQL = select * from user_Form Set mrc = ExecuteSQL(txtSQL, MsgText) (0) = Trim(Text1(0)) (1) = Trim(Text1(1)) (2) = Now For i = 0 To 2 Text1(i) = Next MsgBox 用戶添加成功 !, vbOKOnly, 提示 Listapp End Sub 在工程中添加一個(gè)窗體,命名為“ frmprpi”。 Trim(Text1(0)) amp。 Frmcusi 窗體包含的控件及其屬性如下: 對(duì)象名 屬性 屬性值 Label1 Caption 用戶列表 Label2(0) Caption 添加 Label2(1) Caption 修改 Label2(2) Caption 刪除 Picture1 (0) IMEMode 0 – No Operation List1 List ( List) Command1 Caption 添加 Command2 Caption 取消 編寫窗體代碼 Private Sub Command1_Click() Dim txtSQL As String If Text1(0) = Then MsgBox 用戶名稱不能為空 !, vbOKOnly, 提示 Text1(0).SetFocus Exit Sub 29 End If If Text1(1) = Then MsgBox 用戶密碼不能為空 !, vbOKOnly, 提示 Text1(1).SetFocus Exit Sub Else If Text1(1) Text1(2) Then MsgBox 兩次密碼不同 !, vbOKOnly, 提示 Text1(1) = Text1(2) = Text1(1).SetFocus Exit Sub End If End If txtSQL = select * from user_Form where user_ID=39。 Set mrcc = ExecuteSQL(txSQL, MsgText) Do While Not Trim(mrcc!course_Name) Loop End Sub Private Sub List2Text() Dim txSQL As String Dim mrcc As txSQL = select * from course_Form Set mrcc = ExecuteSQL(txSQL, MsgText) 28 Do While Not Trim(mrcc!course_Name) Loop End Sub 在工程中添加一個(gè)窗體,命名為“ frmcusi”。 Trim() amp。 Set mrc = ExecuteSQL(txtSQL, MsgText) If = False Then Text1(1) = (1) Text1(1).Locked = True Else Text1(1) = Text1(1).Locked = False End If End If End Sub Private Sub Text1_GotFocus(Index As Integer) Text1(Index).SelStart = 0 Text1(Index).SelLength = Len(Text1(Index)) End Sub Private Sub Text1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer) EnterToTab KeyCode End Sub Private Sub List1Text() Dim txSQL As String Dim mrcc As txSQL = select * from class_Cour where class_NO=39。 Trim(Text1(0)) amp。HFFFFFF End Sub Private Sub List1_Click() End Sub Private Sub List2_Click() Text1(0) = 27 End Sub Private Sub Text1_Change(Index As Integer) Dim txSQL As String If Index = 0 Then txtSQL = select * from course_Form where course_Name=39。 39。 amp。 39。 amp。 39。 amp。 39。 amp。 39。 amp。 39。 amp。HC0C0C0 Label3(3).BackColor = amp。HC0C0C0 Label3(1).BackColor = amp。 39。 amp。 39。 amp。 整個(gè)窗體界面如下所示。 39。 amp。 39。 amp。 .Rows = 1 Do While Not .Rows = .Rows + 1 For i = 0 To 1 .TextMatrix(.Rows 1, i) = (i) amp。HE0E0E0 Picture1(i).Visible = False Next Label2(Index).BackColor = amp。 amp。HE0E0E0 Picture1(i).Visible = False Next Label2(0).BackColor = amp。 39。 amp。 39。 amp。 整個(gè)窗體界面示意圖如圖所示 。 窗體屬性 設(shè)置值 具體說明 名稱 dColor 設(shè)置窗體名稱 MaxButton True 激活最大化按鈕 MinButton True 激活最小化按鈕 ControlBox True 控制按鈕 在登錄 窗體中添加控件,并設(shè)置控件的屬性如下表所示: 對(duì)象名 屬性 屬性值 Image1 Picture ( Bitmap) 17 Image2 Picture ( Bitmap) Stretch False Label1 Caption 歡迎進(jìn)去學(xué)生管理系統(tǒng) BackColor 0 – Transparent 編寫窗體代碼 Private Sub Form_Load() = amp。 Set mrc = ExecuteSQL(txtSQL, MsgText) If = True Then MsgBox 沒有這個(gè)用戶,請(qǐng)重新輸入用戶名 , vbOKOnly + vbExclamation, 警告 Else If Trim((1)) = Trim() Then OK = True UserName = Trim() Else MsgBox 輸入的密碼不對(duì),請(qǐng)重新輸入 , vbOKOnly + vbExclamation, 警告 = End If End If miCount = miCount + 1 If miCount = 3 Then 16 End If