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

📄 frmselsubj.vb

📁 这个是本人写的题库系统,开发工具是vb.net.试题编辑,试卷编辑,可以在word中编辑试题.由于时间关系,很多功能需要细化.
💻 VB
字号:
Public Class frmselSubj
    Inherits System.Windows.Forms.Form

#Region " Windows 窗体设计器生成的代码 "

    Public Sub New()
        MyBase.New()

        '该调用是 Windows 窗体设计器所必需的。
        InitializeComponent()

        '在 InitializeComponent() 调用之后添加任何初始化

    End Sub

    '窗体重写 dispose 以清理组件列表。
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Windows 窗体设计器所必需的
    Private components As System.ComponentModel.IContainer

    '注意: 以下过程是 Windows 窗体设计器所必需的
    '可以使用 Windows 窗体设计器修改此过程。
    '不要使用代码编辑器修改它。
    Friend WithEvents comb_selsubj As System.Windows.Forms.ComboBox
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents cmd_ok As System.Windows.Forms.Button
    Friend WithEvents cmd_cancel As System.Windows.Forms.Button
    Friend WithEvents Label2 As System.Windows.Forms.Label
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.comb_selsubj = New System.Windows.Forms.ComboBox
        Me.Label1 = New System.Windows.Forms.Label
        Me.cmd_ok = New System.Windows.Forms.Button
        Me.cmd_cancel = New System.Windows.Forms.Button
        Me.Label2 = New System.Windows.Forms.Label
        Me.SuspendLayout()
        '
        'comb_selsubj
        '
        Me.comb_selsubj.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.comb_selsubj.Location = New System.Drawing.Point(160, 28)
        Me.comb_selsubj.Name = "comb_selsubj"
        Me.comb_selsubj.Size = New System.Drawing.Size(136, 20)
        Me.comb_selsubj.TabIndex = 0
        '
        'Label1
        '
        Me.Label1.Location = New System.Drawing.Point(16, 28)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(144, 24)
        Me.Label1.TabIndex = 1
        Me.Label1.Text = "请选择您要操作的科目:"
        '
        'cmd_ok
        '
        Me.cmd_ok.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.cmd_ok.Location = New System.Drawing.Point(64, 80)
        Me.cmd_ok.Name = "cmd_ok"
        Me.cmd_ok.Size = New System.Drawing.Size(80, 32)
        Me.cmd_ok.TabIndex = 2
        Me.cmd_ok.Text = "确   定"
        '
        'cmd_cancel
        '
        Me.cmd_cancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.cmd_cancel.Location = New System.Drawing.Point(192, 80)
        Me.cmd_cancel.Name = "cmd_cancel"
        Me.cmd_cancel.Size = New System.Drawing.Size(80, 32)
        Me.cmd_cancel.TabIndex = 3
        Me.cmd_cancel.Text = "取   消"
        '
        'Label2
        '
        Me.Label2.Location = New System.Drawing.Point(8, 136)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(328, 40)
        Me.Label2.TabIndex = 4
        Me.Label2.Text = "说明:   系统不允许编辑试题时同时操作多个科目,如果要操作当前科目外其他科目请从新选择当前科目。"
        '
        'frmselSubj
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
        Me.ClientSize = New System.Drawing.Size(338, 175)
        Me.Controls.Add(Me.Label2)
        Me.Controls.Add(Me.cmd_cancel)
        Me.Controls.Add(Me.cmd_ok)
        Me.Controls.Add(Me.Label1)
        Me.Controls.Add(Me.comb_selsubj)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
        Me.MaximizeBox = False
        Me.Name = "frmselSubj"
        Me.Text = "选择当前科目"
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private Sub cmd_ok_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmd_ok.Click
        If comb_selsubj.Text = "" Then
            If comb_selsubj.Items.Count > 0 Then
                MsgBox("请您选择当前操作科目", MsgBoxStyle.Exclamation, "翼清测试题库系统V1.0")
                comb_selsubj.Focus()
                Exit Sub
            Else
                MsgBox("数据库无任何可用科目,请到科目管理模块新添一个", MsgBoxStyle.Exclamation, "翼清测试题库系统V1.0")
                Me.Close()
            End If
        Else
            OpSubjt.SubjectName = Trim(comb_selsubj.Text)
            OpSubjt.GetInfo(MakeStr(comb_selsubj.Text))
            'Me.Parent.Text = "翼清测试题库系统--当前用户[ " & CurUser.UserName & " ]--当前科目[ " & OpSubjt.SubjectName & " ]"
            Me.Close()
        End If
    End Sub

    Private Sub cmd_cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmd_cancel.Click
        Me.Close()
    End Sub

    Private Sub frmselSubj_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        MySubjt.LoadSubDetail(comb_selsubj)
        comb_selsubj.SelectedIndex = 0
    End Sub
End Class

⌨️ 快捷键说明

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