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

📄 frmsrchbookinfo.frm

📁 图书管理系统是针对学校和个人有一定的作用软件
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmSrchBookInfo 
   Caption         =   "Search For Book Information"
   ClientHeight    =   5625
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7035
   Icon            =   "frmSrchBookInfo.frx":0000
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   5625
   ScaleWidth      =   7035
   WindowState     =   2  'Maximized
   Begin VB.TextBox txtBookName 
      BorderStyle     =   0  'None
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3120
      Locked          =   -1  'True
      TabIndex        =   7
      TabStop         =   0   'False
      Top             =   1560
      Width           =   2535
   End
   Begin VB.Frame Frame1 
      Caption         =   "Enter BookId and Press Enter"
      ForeColor       =   &H00FF0000&
      Height          =   735
      Left            =   480
      TabIndex        =   0
      Top             =   600
      Width           =   6135
      Begin VB.TextBox txtBookId 
         BackColor       =   &H0080FFFF&
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   375
         Left            =   2640
         TabIndex        =   2
         Top             =   240
         Width           =   2415
      End
      Begin VB.CommandButton cmdBookOpen 
         Caption         =   "..."
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   14.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   5280
         TabIndex        =   3
         Top             =   240
         Width           =   495
      End
      Begin VB.Label lblBookId 
         AutoSize        =   -1  'True
         Caption         =   "&Book Id"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   14.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   240
         TabIndex        =   1
         Top             =   240
         Width           =   990
      End
   End
   Begin VB.TextBox txtPubId 
      BorderStyle     =   0  'None
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3120
      Locked          =   -1  'True
      TabIndex        =   6
      TabStop         =   0   'False
      Top             =   2760
      Width           =   2655
   End
   Begin VB.TextBox txtCatId 
      BorderStyle     =   0  'None
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3120
      Locked          =   -1  'True
      TabIndex        =   5
      TabStop         =   0   'False
      Top             =   3360
      Width           =   2655
   End
   Begin VB.TextBox txtAuthor 
      BorderStyle     =   0  'None
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3120
      Locked          =   -1  'True
      TabIndex        =   4
      TabStop         =   0   'False
      Top             =   2160
      Width           =   2535
   End
   Begin VB.Label lblBookName 
      AutoSize        =   -1  'True
      Caption         =   "&Book Name"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      Left            =   720
      TabIndex        =   12
      Top             =   1560
      Width           =   1455
   End
   Begin VB.Label lblPubId 
      AutoSize        =   -1  'True
      Caption         =   "&Publication Id"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      Left            =   720
      TabIndex        =   11
      Top             =   2760
      Width           =   1710
   End
   Begin VB.Label lblCatId 
      AutoSize        =   -1  'True
      Caption         =   "&Category Id"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      Left            =   720
      TabIndex        =   10
      Top             =   3360
      Width           =   1470
   End
   Begin VB.Label lblInfo 
      Alignment       =   2  'Center
      BackColor       =   &H00000080&
      Caption         =   "Search for Book Information"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   375
      Left            =   0
      TabIndex        =   9
      Top             =   0
      Width           =   5775
   End
   Begin VB.Label lblAuthor 
      AutoSize        =   -1  'True
      Caption         =   "&Author Name"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      Left            =   720
      TabIndex        =   8
      Top             =   2160
      Width           =   1650
   End
End
Attribute VB_Name = "frmSrchBookInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'=====================================================
'*****************************************************
'* Programmed by : Vivek Patel                       *
'* Contact :  Email   => vivek_patel9@rediffmail.com *
'*            Website => www.VIVEKPATEL.cjb.net      *
'* Description : Search Code for Book  Info          *
'* Vote For Me : If you really enjoy this utility or *
'                 helped by any of the functionality *
'                 than plz. reward us by your VOTE.  *
'*****************************************************
'=====================================================

Private Sub Form_Load()
    'Setting up the info. label
    lblInfo.Left = Me.ScaleLeft
    lblInfo.Top = Me.ScaleTop
    lblInfo.Width = Screen.Width
End Sub

Private Sub Form_Activate()
    clear
End Sub

Private Sub cmdBookOpen_Click()
    frmBookInfo.Show
    frmBookInfo.SetFocus
End Sub


'========================================================
'Database Related Code...!!!
'========================================================

'Supporting Function
'Simple clearing of textBox
Private Sub clear()
    txtBookId.Text = ""
    txtBookName.Text = ""
    txtAuthor.Text = ""
    txtPubId.Text = ""
    txtCatId.Text = ""
    txtBookId.SetFocus
End Sub


Private Sub Txtbookid_KeyPress(KeyAscii As Integer)
    Dim BookNo As String
    
    'assigning Srch value
    BookNo = txtBookId.Text
    
    'If enter is pressed by user than auto-generate record
    If KeyAscii = 13 Then
        clear
        'Prompt if invalid search key is entered by user
        If Not IsNumeric(BookNo) Then
            MsgBox "Invalid Search Key Entered", vbCritical, "Search Error"
            Call clear
            Exit Sub
        End If
        
        rsBookInfo.MoveFirst
        For i = 0 To rsBookInfo.RecordCount
            If rsBookInfo.EOF = True Then
                Exit For
            End If
            If rsBookInfo(0) = Val(Trim$(BookNo)) Then
                txtBookName.Text = rsBookInfo(1)
                txtAuthor.Text = rsBookInfo(2)
                txtPubId.Text = rsBookInfo(3)
                txtCatId.Text = rsBookInfo(4)
                Exit For
            End If
            rsBookInfo.MoveNext
        Next
        
        
        If txtBookName.Text = "" Then
            MsgBox "Book Not in Stock", vbInformation, "Search Not Found"
            'cmdSave.Enabled = False
            clear
        End If
    End If
End Sub

'=====================================================
'*****************************************************
'* Vote For Me : If you really enjoy this utility or *
'                 helped by any of the functionality *
'                 than plz. reward us by your VOTE.  *
'*****************************************************
'=====================================================








⌨️ 快捷键说明

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