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

📄 frmupdatelesson.frm

📁 用VB实现的一个学生管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmupdatelesson 
   BackColor       =   &H00FFFFFF&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "修改课程编号"
   ClientHeight    =   4620
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   3090
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4620
   ScaleWidth      =   3090
   Begin VB.CommandButton CmdQuit 
      Cancel          =   -1  'True
      Caption         =   "返回"
      Height          =   420
      Left            =   1800
      TabIndex        =   3
      Top             =   4065
      Width           =   1050
   End
   Begin VB.CommandButton CmdOK 
      Caption         =   "确认修改"
      Default         =   -1  'True
      Height          =   420
      Left            =   240
      TabIndex        =   2
      Top             =   4065
      Width           =   1050
   End
   Begin VB.TextBox txtnumber 
      Height          =   330
      Left            =   1680
      TabIndex        =   1
      Top             =   120
      Width           =   1245
   End
   Begin VB.ListBox List1 
      Height          =   3120
      Left            =   240
      TabIndex        =   0
      Top             =   705
      Width           =   2655
   End
   Begin VB.Label Label1 
      BackColor       =   &H00FFFFFF&
      Caption         =   "请输入课程编号:"
      Height          =   240
      Left            =   240
      TabIndex        =   4
      Top             =   165
      Width           =   1545
   End
End
Attribute VB_Name = "frmupdatelesson"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public sID1 As String
Private Sub CmdOK_Click()
Dim sCon As String
If txtnumber.Text = "" Then
   txtnumber.Text = "请输课程编号"
   txtnumber.SelStart = 0
   txtnumber.SelLength = Len(txtnumber.Text)
   txtnumber.SetFocus
   Exit Sub
End If
sCon = "select * from Lesson where 课程编号='" & txtnumber.Text & "'"
Set adoRS = adoCon.Execute(sCon)
If adoRS.EOF Then
   MsgBox "对不起,查无此课程,请执行系统查询功能," _
          & vbCrLf & vbCrLf & "确认要修改的编号后再进行修改。", _
          vbInformation + vbOKOnly, "系统提示"
   txtnumber.SetFocus
      txtnumber.SelStart = 0
   txtnumber.SelLength = Len(txtnumber.Text)
   Exit Sub
Else
   sID1 = Trim(txtnumber.Text)
   Unload Me
   frmlessonUpdate.Show
End If
End Sub

Private Sub cmdQuit_Click()
Unload Me
End Sub

Private Sub Form_Load()
frmupdatelesson.Move (Screen.Width - frmupdatelesson.Width) / 2, (Screen.Height - frmupdatelesson.Height) / 2
frmupdatelesson.Show
Me.Height = 5100
Me.Width = 3180
txtnumber.SetFocus
Set adoRS = adoCon.Execute("Select 课程编号 From Lesson Order By 课程编号")
List1.Clear
Do While Not adoRS.EOF
  List1.AddItem adoRS("课程编号")
  adoRS.MoveNext
Loop
List1.ListIndex = 0

End Sub

Private Sub List1_Click()
txtnumber.Text = List1.Text
End Sub

⌨️ 快捷键说明

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