frm_bb_bhgbb.frm
来自「完整的物资管理系统源码」· FRM 代码 · 共 309 行
FRM
309 行
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frm_bb_bhgbb
BorderStyle = 3 'Fixed Dialog
ClientHeight = 8355
ClientLeft = 45
ClientTop = 330
ClientWidth = 9075
Icon = "frm_bb_bhgbb.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 8355
ScaleWidth = 9075
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton cmdPrint
Caption = "打印"
Height = 300
Left = 7095
TabIndex = 12
Top = 7920
Width = 1680
End
Begin VB.PictureBox PicScroll
BackColor = &H8000000E&
Height = 7725
Left = 30
ScaleHeight = 7665
ScaleWidth = 8700
TabIndex = 8
Top = 30
Width = 8760
Begin MSAdodcLib.Adodc Adodc1
Height = 360
Left = -570
Top = 7215
Visible = 0 'False
Width = 1740
_ExtentX = 3069
_ExtentY = 635
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=mr_material"
OLEDBString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=mr_material"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.PictureBox PicZoom
Appearance = 0 'Flat
AutoRedraw = -1 'True
AutoSize = -1 'True
BackColor = &H80000005&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 11895
Left = 210
Picture = "frm_bb_bhgbb.frx":000C
ScaleHeight = 11895
ScaleWidth = 8220
TabIndex = 9
Top = 60
Width = 8220
Begin VB.Label Label1
BackStyle = 0 'Transparent
Height = 225
Index = 2
Left = 6165
TabIndex = 14
Top = 1155
Width = 1875
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Height = 225
Index = 1
Left = 2145
TabIndex = 13
Top = 1155
Width = 2655
End
Begin VB.Label lblCount
BackStyle = 0 'Transparent
Height = 225
Left = 1050
TabIndex = 11
Top = 585
Width = 1140
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Height = 225
Index = 0
Left = 6195
TabIndex = 10
Top = 885
Width = 1875
End
End
End
Begin VB.CommandButton Command1
Caption = "打印"
Height = 390
Index = 2
Left = 4425
TabIndex = 7
Top = 6765
Width = 1695
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 390
Index = 1
Left = 1290
TabIndex = 6
Top = 6795
Width = 960
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 390
Index = 0
Left = 225
TabIndex = 5
Top = 6765
Width = 960
End
Begin VB.VScrollBar VSImage
Height = 7725
Left = 8775
TabIndex = 4
TabStop = 0 'False
Top = 30
Width = 255
End
Begin VB.CommandButton CmdMD
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Index = 3
Left = 3540
Picture = "frm_bb_bhgbb.frx":13E4DA
Style = 1 'Graphical
TabIndex = 3
Top = 7920
Width = 1020
End
Begin VB.CommandButton CmdMD
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Index = 0
Left = 345
Picture = "frm_bb_bhgbb.frx":13E7EC
Style = 1 'Graphical
TabIndex = 2
Top = 7920
Width = 1020
End
Begin VB.CommandButton CmdMD
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Index = 1
Left = 1410
Picture = "frm_bb_bhgbb.frx":13EA86
Style = 1 'Graphical
TabIndex = 1
Top = 7920
Width = 1020
End
Begin VB.CommandButton CmdMD
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Index = 2
Left = 2475
Picture = "frm_bb_bhgbb.frx":13ED98
Style = 1 'Graphical
TabIndex = 0
Top = 7920
Width = 1020
End
End
Attribute VB_Name = "frm_bb_bhgbb"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Sub view_data() '定义显示数据的过程
For i = 0 To 13
If Adodc1.Recordset.RecordCount > 0 Then
If Adodc1.Recordset.Fields(i) <> "" Then
Label1(0) = Adodc1.Recordset.Fields("物资名称")
Label1(1) = Adodc1.Recordset.Fields("进货日期")
Label1(2) = Adodc1.Recordset.Fields("金额")
Else
Label1(i) = ""
End If
End If
Next i
End Sub
Private Sub CmdMD_Click(Index As Integer)
Select Case Index
Case Is = 0 '移到第一条记录
If Not Adodc1.Recordset.BOF Then Adodc1.Recordset.MoveFirst
Case Is = 1 '移到上一条记录
If Adodc1.Recordset.RecordCount > 0 Then
If Adodc1.Recordset.BOF = False Then Adodc1.Recordset.MovePrevious
If Adodc1.Recordset.BOF = True Then Adodc1.Recordset.MoveFirst
End If
Case Is = 2 '移到下一条记录
If Adodc1.Recordset.RecordCount > 0 Then
If Adodc1.Recordset.EOF = False Then Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF = True Then Adodc1.Recordset.MoveLast
End If
Case Is = 3 '移到最后一条记录
If Adodc1.Recordset.EOF = False Then Adodc1.Recordset.MoveLast
End Select
view_data '调用过程
lblCount.Caption = Format(Adodc1.Recordset.AbsolutePosition, "000")
End Sub
Private Sub cmdPrint_Click()
Printer.Orientation = vbPRORPortrait
Printer.PaintPicture PicZoom.Picture, 100, 100, PicZoom.Width, PicZoom.Height
Printer.EndDoc
End Sub
Private Sub Form_Load()
Adodc1.RecordSource = "select * from tb_rk where 进货日期 between '" + strStartDate + "'AND '" + strEndDate + "'and 检验和试验结果='不合格'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
If Not Adodc1.Recordset.BOF Then Adodc1.Recordset.MoveFirst
lblCount.Caption = Format(Adodc1.Recordset.AbsolutePosition, "000")
view_data
End If
End Sub
Private Sub VSImage_Change()
On Error Resume Next
PicZoom.Top = -VSImage.Value * 20
End Sub
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub VSImage_Scroll()
On Error Resume Next
PicZoom.Top = -VSImage.Value
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?