【VB开源代码栏目提醒】:网学会员--在 VB开源代码编辑为广大网友搜集整理了:frmBook.frm绩等信息,祝愿广大网友取得需要的信息,参考学习。
VERSION 5.00
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmBook
BorderStyle = 1 'Fixed Single
Caption = "图书信息查询"
ClientHeight = 4260
ClientLeft = 465
ClientTop = 1635
ClientWidth = 9300
HelpContextID = 7
Icon = "frmBook.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4260
ScaleWidth = 9300
Begin VB.CommandButton Command2
Caption = "打印"
Height = 300
Left = 7680
TabIndex = 5
Top = 1320
Width = 1335
End
Begin MSComctlLib.StatusBar StatusBar1
Align = 2 'Align Bottom
Height = 300
Left = 0
TabIndex = 4
Top = 3960
Width = 9300
_ExtentX = 16404
_ExtentY = 529
Style = 1
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 1
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
EndProperty
EndProperty
End
Begin VB.TextBox Text1
Height = 300
Left = 7440
TabIndex = 2
Top = 360
Width = 1695
End
Begin VB.CommandButton Command1
Caption = "查找"
Height = 300
Left = 7680
TabIndex = 1
Top = 840
Width = 1335
End
Begin MSDataGridLib.DataGrid DataGrid1
Height = 3690
Left = 120
TabIndex = 0
Top = 120
Width = 7155
_ExtentX = 12621
_ExtentY = 6509
_Version = 393216
AllowUpdate = 0 'False
HeadLines = 2
RowHeight = 17
FormatLocked = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 7
BeginProperty Column00
DataField = "类别代码"
Caption = "类别"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = "图书编码"
Caption = "图书编码"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column02
DataField = "书名"
Caption = "书名"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column03
DataField = "作者"
Caption = "作者"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column04
DataField = "定价"
Caption = "定价"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 1
Format = """¥""#,##0.00"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 2
EndProperty
EndProperty
BeginProperty Column05
DataField = "出版单位"
Caption = "出版单位"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column06
DataField = "简介"
Caption = "简介"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
ColumnWidth = 464.882
EndProperty
BeginProperty Column01
Locked = -1 'True
ColumnWidth = 854.929
EndProperty
BeginProperty Column02
ColumnWidth = 2099.906
EndProperty
BeginProperty Column03
ColumnWidth = 1409.953
EndProperty
BeginProperty Column04
ColumnWidth = 884.976
EndProperty
BeginProperty Column05
ColumnWidth = 1140.095
EndProperty
BeginProperty Column06
ColumnWidth = 4004.788
EndProperty
EndProperty
End
Begin VB.Label Label1
Caption = "书名:"
Height = 300
Left = 7440
TabIndex = 3
Top = 120
Width = 855
End
End
Attribute VB_Name = "frmBook"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim conn As ADODB.Connection
Dim WithEvents rs As ADODB.Recordset
Attribute rs.VB_VarHelpID = -1
Private Sub Command1_Click()
Dim strSQL As String
Set conn = New ADODB.Connection
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=" & App.Path & "\Library.mdb;" & "Persist Security Info=False"
strSQL = "SELECT * " _
& "FROM 图书编码 WHERE 书名 LIKE '" & Text1 & "%' ORDER BY 类别代码,书名,出版单位"
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open strSQL, conn, adOpenStatic, adLockReadOnly
Set DataGrid1.DataSource = rs
End Sub
Private Sub Command2_Click()
On Error GoTo ErrBar
Set DrpBook.DataSource = rs.Clone
DrpBook.Show
ErrBar:
End Sub
Private Sub rs_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, _
ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, _
ByVal
上一篇:
DiskCata.cpp
下一篇:
网络能耗监测系统管理端的研究与实现