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

📄 frmbooktype.frm

📁 这是一个图书馆管理系统网络版
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form FrmBookType 
   BackColor       =   &H00FFC0C0&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "图书类别管理"
   ClientHeight    =   5295
   ClientLeft      =   45
   ClientTop       =   360
   ClientWidth     =   7455
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   ScaleHeight     =   5295
   ScaleWidth      =   7455
   Begin VB.CommandButton CmdCancel 
      Cancel          =   -1  'True
      Caption         =   "返回"
      Height          =   375
      Left            =   4080
      TabIndex        =   1
      Top             =   4800
      Width           =   1215
   End
   Begin VB.Frame FrameQuery 
      BackColor       =   &H00FFC0C0&
      Caption         =   "查看图书类别"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF00FF&
      Height          =   3255
      Left            =   480
      TabIndex        =   6
      Top             =   600
      Width           =   5535
      Begin VB.ListBox ListQuery 
         Height          =   2400
         Left            =   120
         TabIndex        =   7
         Top             =   360
         Width           =   4095
      End
   End
   Begin VB.Frame FrameAdd 
      BackColor       =   &H00FFC0C0&
      Caption         =   "添加图书类别"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF00FF&
      Height          =   3135
      Left            =   480
      TabIndex        =   2
      Top             =   600
      Width           =   5295
      Begin VB.CommandButton CmdAddOk 
         Caption         =   "添加"
         Height          =   375
         Left            =   1920
         TabIndex        =   5
         Top             =   1800
         Width           =   1215
      End
      Begin VB.TextBox TextTypeName 
         Height          =   375
         Left            =   120
         TabIndex        =   4
         Top             =   840
         Width           =   4815
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "类别名称:"
         BeginProperty Font 
            Name            =   "楷体_GB2312"
            Size            =   12
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   375
         Left            =   240
         TabIndex        =   3
         Top             =   480
         Width           =   1335
      End
   End
   Begin MSComctlLib.TabStrip TabStrip1 
      Height          =   4095
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   6255
      _ExtentX        =   11033
      _ExtentY        =   7223
      _Version        =   393216
      BeginProperty Tabs {1EFB6598-857C-11D1-B16A-00C0F0283628} 
         NumTabs         =   2
         BeginProperty Tab1 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "添加"
            Key             =   "Type_Add"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab2 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "查看"
            Key             =   "Type_Query"
            ImageVarType    =   2
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "FrmBookType"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'添加图书类别
Private Sub CmdAddOk_Click()
Dim str As String

    '检验输入内容
    If Len(Trim(Me.TextTypeName.Text)) <= 0 Then
        MsgBox "请输入类别名称!"
        Exit Sub
    ElseIf Len(Trim(Me.TextTypeName.Text)) > 10 Then
        MsgBox "您输入的类别名称过长!"
        Exit Sub
    End If
        
    '生成要发送的数据 = Type,01,Type_Name
    str = "Type," & "01," & Me.TextTypeName.Text
    '检验sock连接
    If MDIFrm.SockToSvr.State <> sckConnected Then
        MsgBox "还没有连接数据库,不能发送请求!"
        Exit Sub
    End If
    '向服务器发送数据
    MDIFrm.SockToSvr.SendData str

End Sub

Private Sub CmdCancel_Click()   '返回
    Unload Me
End Sub

Private Sub Form_Load()
    Me.FrameAdd.Visible = True
    Me.FrameQuery.Visible = False
End Sub

'选项卡切换
Private Sub TabStrip1_Click()
Dim str As String
    
    Select Case TabStrip1.SelectedItem.Key
    '添加图书类别
    Case "Type_Add"
        Me.FrameAdd.Visible = True
        Me.FrameQuery.Visible = False
    '查看所有类别
    Case "Type_Query"
        Me.FrameAdd.Visible = False
        Me.FrameQuery.Visible = True
        '生成要发送的数据 = Type,02
        str = "Type," & "02"
        '检验sock连接并向服务器发送数据
        If MDIFrm.SockToSvr.State <> sckConnected Then
            MsgBox "还没有连接数据库,不能发送请求!"
            Exit Sub
        End If
        MDIFrm.SockToSvr.SendData str
    End Select
End Sub

⌨️ 快捷键说明

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