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

📄 frmaddbookstyle.frm

📁 VB+SQL写的图书管理系统,用了ACTIVESKIN界面,请自行下载该控件
💻 FRM
字号:
VERSION 5.00
Object = "{74848F95-A02A-4286-AF0C-A3C755E4A5B3}#1.0#0"; "actskn43.ocx"
Begin VB.Form frmaddbookstyle 
   Caption         =   "添加图书类别"
   ClientHeight    =   3600
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5820
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   3600
   ScaleWidth      =   5820
   StartUpPosition =   2  '屏幕中心
   Begin ACTIVESKINLibCtl.SkinLabel SkinLabel2 
      Height          =   255
      Left            =   840
      OleObjectBlob   =   "frmaddbookstyle.frx":0000
      TabIndex        =   5
      Top             =   1320
      Width           =   975
   End
   Begin ACTIVESKINLibCtl.SkinLabel SkinLabel1 
      Height          =   255
      Left            =   840
      OleObjectBlob   =   "frmaddbookstyle.frx":0066
      TabIndex        =   4
      Top             =   480
      Width           =   975
   End
   Begin ACTIVESKINLibCtl.Skin Skin1 
      Left            =   720
      OleObjectBlob   =   "frmaddbookstyle.frx":00CC
      Top             =   2520
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   495
      Left            =   3480
      TabIndex        =   3
      Top             =   2400
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   495
      Left            =   1200
      TabIndex        =   2
      Top             =   2400
      Width           =   1335
   End
   Begin VB.TextBox Text2 
      Height          =   495
      Left            =   2160
      TabIndex        =   1
      Top             =   1200
      Width           =   3015
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   2160
      TabIndex        =   0
      Top             =   360
      Width           =   3015
   End
End
Attribute VB_Name = "frmaddbookstyle"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
 Dim sql As String
 Dim rs_bookstyle As New ADODB.Recordset
 If Trim(Text1.Text) = "" Then
   MsgBox "图书种类不能为空 ", vbOK0nly + vbExclamation, ""
   Text1.SetFocus
   Exit Sub
 End If
 If Trim(Text2.Text) = "" Then
   MsgBox "种类编号不能为空", vbOK0nly + vbExclamation, ""
   Text2.SetFocus
   Exit Sub
 End If
 
 sql = "select * from 图书类别 where 类别名称='" & Text1.Text & "'"
 rs_bookstyle.Open sql, conn, adOpenKeyset, adLockPessimistic
 If rs_bookstyle.EOF Then
   rs_bookstyle.AddNew
   rs_bookstyle.Fields(0) = Trim(Text1.Text)
   rs_bookstyle.Fields(1) = Trim(Text2.Text)
   rs_bookstyle.Update
   MsgBox "添加图书类别成功!", vbOKOnly, ""
   rs_bookstyle.Close
 Else
   MsgBox "图书类别重复!", vbOKOnly + vbExclamation, ""
   Text1.SetFocus
   Text1.Text = ""
   rs_bookstyle.Close
   Exit Sub
End If
End Sub

Private Sub Command2_Click()
 Unload Me
End Sub

Private Sub Form_Load()
Dim skn
skn = App.Path & "\Book.skn"

'载入时的一些脚本.
Skin1.LoadSkin skn
Skin1.ApplySkin Me.hWnd ' 应用皮肤到这个窗口和它的子控件中
End Sub

⌨️ 快捷键说明

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