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

📄 frm_main.frm

📁 采用VB编写的学生订票管理系统 有详细的代码~解压后可以直接使用!~附有使用说明
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form Frm_main 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "学生订票管理系统-客户端"
   ClientHeight    =   5925
   ClientLeft      =   150
   ClientTop       =   435
   ClientWidth     =   9645
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   ScaleHeight     =   5925
   ScaleWidth      =   9645
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox Text4 
      Height          =   360
      Left            =   2760
      TabIndex        =   9
      Text            =   "Text4"
      Top             =   6030
      Width           =   1425
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   840
      TabIndex        =   8
      Text            =   "Text3"
      Top             =   6030
      Width           =   1275
   End
   Begin VB.TextBox Text2 
      Height          =   345
      IMEMode         =   3  'DISABLE
      Left            =   75
      PasswordChar    =   "*"
      TabIndex        =   7
      Text            =   "Text2"
      Top             =   3300
      Width           =   1740
   End
   Begin VB.TextBox Text1 
      Height          =   345
      Left            =   90
      TabIndex        =   2
      Text            =   "Text1"
      Top             =   2535
      Width           =   1725
   End
   Begin MSComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   300
      Left            =   0
      TabIndex        =   1
      Top             =   5625
      Width           =   9645
      _ExtentX        =   17013
      _ExtentY        =   529
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   4
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   6
            Object.Width           =   2541
            MinWidth        =   2541
            TextSave        =   "2008-1-18"
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   5
            Object.Width           =   2541
            MinWidth        =   2541
            TextSave        =   "17:32"
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   8291
            MinWidth        =   8291
            Text            =   "    欢迎使用学生订票管理系统"
            TextSave        =   "    欢迎使用学生订票管理系统"
         EndProperty
         BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   3528
            MinWidth        =   3528
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar Toolbar1 
      Align           =   1  'Align Top
      Height          =   855
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   9645
      _ExtentX        =   17013
      _ExtentY        =   1508
      ButtonWidth     =   1773
      ButtonHeight    =   1349
      Appearance      =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   7
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "列车时刻表"
            Key             =   "lcsk"
            ImageIndex      =   1
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "车次查询"
            Key             =   "cccx"
            ImageIndex      =   2
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "订票"
            Key             =   "dp"
            ImageIndex      =   3
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "退票"
            Key             =   "tp"
            ImageIndex      =   4
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "剩余车票"
            Key             =   "sycp"
            ImageIndex      =   5
         EndProperty
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "求购转让"
            Key             =   "cpzr"
            ImageIndex      =   6
         EndProperty
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "退出系统"
            Key             =   "exit"
            ImageIndex      =   7
         EndProperty
      EndProperty
      Begin MSComctlLib.ImageList ImageList1 
         Left            =   8250
         Top             =   225
         _ExtentX        =   1005
         _ExtentY        =   1005
         BackColor       =   -2147483643
         ImageWidth      =   32
         ImageHeight     =   32
         MaskColor       =   12632256
         _Version        =   393216
         BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
            NumListImages   =   7
            BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Frm_main.frx":0000
               Key             =   ""
            EndProperty
            BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Frm_main.frx":0C54
               Key             =   ""
            EndProperty
            BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Frm_main.frx":18A8
               Key             =   ""
            EndProperty
            BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Frm_main.frx":24FC
               Key             =   ""
            EndProperty
            BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Frm_main.frx":3150
               Key             =   ""
            EndProperty
            BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Frm_main.frx":3DA4
               Key             =   ""
            EndProperty
            BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Frm_main.frx":49F8
               Key             =   ""
            EndProperty
         EndProperty
      End
   End
   Begin VB.Label Label6 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      ForeColor       =   &H80000008&
      Height          =   315
      Left            =   555
      TabIndex        =   3
      Top             =   3795
      Width           =   735
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "提示:用户名和密码都为学生学号"
      ForeColor       =   &H000000FF&
      Height          =   435
      Left            =   75
      TabIndex        =   5
      Top             =   4305
      Width           =   1725
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Height          =   315
      Left            =   75
      TabIndex        =   4
      Top             =   1080
      Width           =   1350
   End
   Begin VB.Image Image1 
      Height          =   4770
      Left            =   0
      Picture         =   "Frm_main.frx":564C
      Top             =   840
      Width           =   9645
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "Label1"
      Height          =   1005
      Left            =   2175
      TabIndex        =   6
      Top             =   0
      Width           =   1035
   End
   Begin VB.Menu ccxx 
      Caption         =   "车次信息查询"
      Begin VB.Menu lcskb 
         Caption         =   "列车时刻表"
         Shortcut        =   ^A
      End
      Begin VB.Menu cccx 
         Caption         =   "车次查询"
      End
      Begin VB.Menu gg 
         Caption         =   "-"
      End
      Begin VB.Menu qgzr 
         Caption         =   "求购转让"
      End
   End
   Begin VB.Menu dpxx 
      Caption         =   "订票信息管理"
      Begin VB.Menu dp 
         Caption         =   "订票"
         Shortcut        =   ^D
      End
      Begin VB.Menu dpcx 
         Caption         =   "订票查询"
      End
      Begin VB.Menu ggg 
         Caption         =   "-"
      End
      Begin VB.Menu tp 
         Caption         =   "退票"
         Shortcut        =   ^T
      End
      Begin VB.Menu tpcx 
         Caption         =   "退票查询"
      End
      Begin VB.Menu gggg 
         Caption         =   "-"
      End
      Begin VB.Menu sycp 
         Caption         =   "剩余车票查询"
      End
   End
   Begin VB.Menu dpxz 
      Caption         =   "订票须知"
   End
   Begin VB.Menu exit 
      Caption         =   "退出系统"
   End
End
Attribute VB_Name = "Frm_main"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub about_Click()

End Sub

Private Sub bz_Click()

End Sub

Private Sub cccx_Click()
    Frm_cccx.Show
End Sub
Private Sub dp_Click()
    If Label1.Caption = "" Then
        MsgBox "请先登录,再订票!", , "学生订票管理系统"
        Exit Sub
    Else
         Frm_dpgl.Show 1
    End If
End Sub
Private Sub dpcx_Click()
    Frm_dpcx.Show 1
End Sub

Private Sub dpxz_Click()
Load Frm_dpxz
Frm_dpxz.Show 1
End Sub
Private Sub exit_Click()
    End
End Sub
Private Sub tp_Click()
    If Label1.Caption = "" Then
        MsgBox "请先登录,再退票!", , "学生订票管理系统"
        Exit Sub
    Else
        Frm_tpgl.Show 1
    End If
End Sub
Private Sub tpcx_Click()
    Frm_tpcx.Show 1
End Sub
Private Sub lcskb_Click()
    Frm_lcskb.Show 1
End Sub
Private Sub qgzr_Click()
    Frm_qgzr.Show 1
End Sub
Private Sub sycp_Click()
    Frm_sycp.Show 1
End Sub
Private Sub Form_Load()
    Text1.Text = ""
    Text2.Text = ""
End Sub
Private Sub Label6_Click()
    Dim rs1 As New ADODB.Recordset
    Dim rs2 As New ADODB.Recordset
    Label1.Caption = ""
    If Text1.Text = "" And Text2.Text = "" Then
        MsgBox "用户名或密码不能为空!", , "学生订票管理系统"
        Exit Sub
    End If
    rs1.Open "tb_stu", cnn, adOpenStatic, , adCmdTable
    rs2.Open "select * from tb_stu where  学号='" & Text1.Text & "' and 学号='" & Text2.Text & "'", cnn, adOpenKeyset, adLockOptimistic
    If rs2.RecordCount < 1 Then
        MsgBox "登录错误!", , "学生订票管理系统"
        Text2.Text = ""
    Else
        If rs2.RecordCount = 1 Then
            MsgBox "登录成功!", , "学生订票管理系统"
           Text3.Text = Text1.Text: Text4.Text = rs2.Fields("学生姓名")
            Label1.Caption = rs2.Fields("学生姓名") & "同学:"
            StatusBar1.Panels(4).Text = "学生姓名:" + rs2.Fields("学生姓名")
            Frm_dpxz.Show 1
        End If
    End If
    rs1.Close
    rs2.Close
    Text1.Text = "": Text2.Text = "": Text1.SetFocus
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
    Select Case Button.Key
    Case "lcsk"
        Load Frm_lcskb
        Frm_lcskb.Show 1
    Case "cccx"
        Load Frm_cccx
        Frm_cccx.Show 1
    Case "dp"
        If Label1.Caption = "" Then
            MsgBox "请先登录,再订票!", , "学生订票管理系统"
            Exit Sub
        Else
            Frm_dpgl.Show 1
        End If
    Case "tp"
        If Label1.Caption = "" Then
            MsgBox "请先登录,再退票!", , "学生订票管理系统"
            Exit Sub
        Else
            Frm_tpgl.Show 1
        End If
    Case "sycp"
        Load Frm_sycp
        Frm_sycp.Show
    Case "cpzr"
        Load Frm_qgzr
        Frm_qgzr.Show 1
    Case "exit"
        If MsgBox("确定退出系统?", 4, "学生订票管理系统") = vbYes Then
            End
        End If
    End Select
End Sub

⌨️ 快捷键说明

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