📄 frmdraw.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmDraw
Caption = "Form1"
ClientHeight = 8400
ClientLeft = 60
ClientTop = 345
ClientWidth = 10815
KeyPreview = -1 'True
LinkTopic = "Form1"
ScaleHeight = 8400
ScaleWidth = 10815
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton cmdBand
Caption = "页尾"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 1
Left = 0
MousePointer = 7 'Size N S
TabIndex = 14
TabStop = 0 'False
Top = 4800
Width = 8655
End
Begin MSComctlLib.StatusBar sb
Align = 2 'Align Bottom
Height = 375
Left = 0
TabIndex = 0
Top = 8025
Width = 10815
_ExtentX = 19076
_ExtentY = 661
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 3
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 5080
MinWidth = 5080
Text = "Select"
TextSave = "Select"
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
EndProperty
EndProperty
End
Begin MSComctlLib.ImageList imlToolbarIcons
Left = 8640
Top = 120
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 32
ImageHeight = 32
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 4
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmDraw.frx":0000
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmDraw.frx":0252
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmDraw.frx":04A4
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmDraw.frx":06F6
Key = ""
EndProperty
EndProperty
End
Begin MSComctlLib.Toolbar tb
Align = 1 'Align Top
Height = 660
Left = 0
TabIndex = 1
Top = 0
Width = 10815
_ExtentX = 19076
_ExtentY = 1164
ButtonWidth = 1032
ButtonHeight = 1005
Appearance = 1
ImageList = "imlToolbarIcons"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 4
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "Select"
ImageIndex = 1
Style = 2
Value = 1
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "Label"
ImageIndex = 2
Style = 2
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "Text"
ImageIndex = 3
Style = 2
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "Shape"
ImageIndex = 4
Style = 2
EndProperty
EndProperty
BorderStyle = 1
End
Begin VB.PictureBox picHead
Appearance = 0 'Flat
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 255
Left = 0
ScaleHeight = 255
ScaleWidth = 8655
TabIndex = 12
TabStop = 0 'False
Top = 4440
Width = 8655
End
Begin VB.CommandButton cmdBand
Caption = "页首"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 0
Left = 0
MousePointer = 7 'Size N S
TabIndex = 13
TabStop = 0 'False
Top = 4200
Width = 8655
End
Begin VB.Label lblPoint
Appearance = 0 'Flat
BackColor = &H00FF0000&
BorderStyle = 1 'Fixed Single
ForeColor = &H80000008&
Height = 105
Index = 7
Left = 0
TabIndex = 11
Top = 0
Visible = 0 'False
Width = 105
End
Begin VB.Label lblPoint
Appearance = 0 'Flat
BackColor = &H00FF0000&
BorderStyle = 1 'Fixed Single
ForeColor = &H80000008&
Height = 105
Index = 6
Left = 0
TabIndex = 10
Top = 0
Visible = 0 'False
Width = 105
End
Begin VB.Label lblPoint
Appearance = 0 'Flat
BackColor = &H00FF0000&
BorderStyle = 1 'Fixed Single
ForeColor = &H80000008&
Height = 105
Index = 5
Left = 0
MousePointer = 7 'Size N S
TabIndex = 9
Top = 0
Visible = 0 'False
Width = 105
End
Begin VB.Label lblPoint
Appearance = 0 'Flat
BackColor = &H00FF0000&
BorderStyle = 1 'Fixed Single
ForeColor = &H80000008&
Height = 105
Index = 4
Left = 0
MousePointer = 8 'Size NW SE
TabIndex = 8
Top = 0
Visible = 0 'False
Width = 105
End
Begin VB.Label lblPoint
Appearance = 0 'Flat
BackColor = &H00FF0000&
BorderStyle = 1 'Fixed Single
ForeColor = &H80000008&
Height = 105
Index = 3
Left = 0
MousePointer = 9 'Size W E
TabIndex = 7
Top = 0
Visible = 0 'False
Width = 105
End
Begin VB.Label lblPoint
Appearance = 0 'Flat
BackColor = &H00FF0000&
BorderStyle = 1 'Fixed Single
ForeColor = &H80000008&
Height = 105
Index = 2
Left = 0
TabIndex = 6
Top = 0
Visible = 0 'False
Width = 105
End
Begin VB.Label lblPoint
Appearance = 0 'Flat
BackColor = &H00FF0000&
BorderStyle = 1 'Fixed Single
ForeColor = &H80000008&
Height = 105
Index = 1
Left = 0
TabIndex = 5
Top = 0
Visible = 0 'False
Width = 105
End
Begin VB.Label lblPoint
Appearance = 0 'Flat
BackColor = &H00FF0000&
BorderStyle = 1 'Fixed Single
ForeColor = &H80000008&
Height = 105
Index = 0
Left = 3480
TabIndex = 4
Top = 0
Visible = 0 'False
Width = 105
End
Begin VB.Shape shpLine
Height = 375
Index = 0
Left = 7200
Top = 0
Visible = 0 'False
Width = 1575
End
Begin VB.Label lblLabel
AutoSize = -1 'True
Caption = "Label"
Height = 195
Index = 0
Left = 4080
TabIndex = 3
Top = 0
Visible = 0 'False
Width = 390
End
Begin VB.Label lblText
Appearance = 0 'Flat
BorderStyle = 1 'Fixed Single
Caption = "Text"
ForeColor = &H80000008&
Height = 375
Index = 0
Left = 5760
TabIndex = 2
Top = 0
Visible = 0 'False
Width = 975
End
End
Attribute VB_Name = "frmDraw"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'============================================
'功能:具有简单的图形编辑功能,用于定义报表的页首和页尾结构
'创建时间:2001.10.22
'作者:黄敬东
'最后修改时间:2001.10.23
'============================================
Option Explicit
'============================================
'自定义枚举类型数据结构,和工具栏按钮对应
'============================================
Private Enum ShpType
shpSelect = 0
shpLabel = 1
shpText = 2
shpShape = 3
End Enum
Dim stCurType As ShpType '当前工具栏按钮状态
Dim bIsMove As Boolean '是否处在移动状态
Dim bIsResize As Boolean '是否处在改变大小状态
Dim bSelected As Boolean '是否有对象被选中
Dim recShape As Rectangle '对象shape包含的区域
Dim labelCount As Integer, textCount As Integer, shapeCount As Integer '各种对象的总数
Dim cltObject As New Collection '临时保存对象的集合
'============================================
'设置表示被选中的点的状态
'============================================
Private Sub SetPoint(ByVal bIsShow As Boolean, ByVal Top As Integer, ByVal Left As Integer, ByVal Height As Integer, ByVal Width As Integer)
Dim i As Integer
If bIsShow Then
lblPoint(0).Left = Left - 100
lblPoint(0).Top = Top - 100
lblPoint(1).Left = Left + Width / 2 - 50
lblPoint(1).Top = Top - 100
lblPoint(2).Left = Left + Width
lblPoint(2).Top = Top - 100
lblPoint(3).Left = Left + Width
lblPoint(3).Top = Top + Height / 2 - 50
lblPoint(4).Left = Left + Width
lblPoint(4).Top = Top + Height
lblPoint(5).Left = Left + Width / 2 - 50
lblPoint(5).Top = Top + Height
lblPoint(6).Left = Left - 100
lblPoint(6).Top = Top + Height
lblPoint(7).Left = Left - 100
lblPoint(7).Top = Top + Height / 2 - 50
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -