📄 objdraw.ctl
字号:
VERSION 5.00
Begin VB.UserControl ObjDraw
AutoRedraw = -1 'True
BorderStyle = 1 'Fixed Single
ClientHeight = 3945
ClientLeft = 0
ClientTop = 0
ClientWidth = 5580
ClipBehavior = 0 '无
ClipControls = 0 'False
FillStyle = 0 'Solid
HasDC = 0 'False
HitBehavior = 0 '无
ScaleHeight = 263
ScaleMode = 3 'Pixel
ScaleWidth = 372
ToolboxBitmap = "ObjDraw.ctx":0000
Begin VB.HScrollBar HScroll1
Height = 240
LargeChange = 50
Left = 1890
Max = 0
TabIndex = 3
TabStop = 0 'False
Top = 3420
Visible = 0 'False
Width = 2625
End
Begin VB.VScrollBar VScroll1
Height = 2085
LargeChange = 50
Left = 4545
Max = 0
TabIndex = 4
TabStop = 0 'False
Top = 1305
Visible = 0 'False
Width = 240
End
Begin VB.CommandButton Corner
Height = 240
Left = 4545
TabIndex = 5
Top = 3420
Visible = 0 'False
Width = 240
End
Begin VB.PictureBox PicData
AutoRedraw = -1 'True
AutoSize = -1 'True
BorderStyle = 0 'None
Height = 825
Left = 4950
ScaleHeight = 825
ScaleWidth = 1005
TabIndex = 0
Top = 1440
Visible = 0 'False
Width = 1005
End
Begin VB.PictureBox DrawControl
AutoRedraw = -1 'True
BackColor = &H00FFFFFF&
BorderStyle = 0 'None
DrawMode = 6 'Mask Pen Not
Height = 2355
Left = 180
ScaleHeight = 157
ScaleMode = 3 'Pixel
ScaleWidth = 241
TabIndex = 1
Top = 720
Width = 3615
Begin VB.TextBox myText
Appearance = 0 'Flat
Height = 285
Left = 480
MultiLine = -1 'True
TabIndex = 2
Text = "ObjDraw.ctx":0312
Top = 690
Visible = 0 'False
Width = 915
End
Begin VB.Label griff
Appearance = 0 'Flat
BackColor = &H00C00000&
ForeColor = &H80000008&
Height = 120
Index = 0
Left = 60
MousePointer = 2 'Cross
TabIndex = 9
Top = 90
Visible = 0 'False
Width = 120
End
Begin VB.Label griff
Appearance = 0 'Flat
BackColor = &H00C00000&
ForeColor = &H80000008&
Height = 120
Index = 1
Left = 240
MousePointer = 2 'Cross
TabIndex = 8
Top = 90
Visible = 0 'False
Width = 120
End
Begin VB.Label griff
Appearance = 0 'Flat
BackColor = &H00C00000&
ForeColor = &H80000008&
Height = 120
Index = 2
Left = 420
MousePointer = 2 'Cross
TabIndex = 7
Top = 90
Visible = 0 'False
Width = 120
End
Begin VB.Label griff
Appearance = 0 'Flat
BackColor = &H00C00000&
ForeColor = &H80000008&
Height = 120
Index = 3
Left = 600
MousePointer = 2 'Cross
TabIndex = 6
Top = 90
Visible = 0 'False
Width = 120
End
End
Begin VB.Image cRoundRect
Height = 480
Left = 4650
Picture = "ObjDraw.ctx":031D
Top = 150
Visible = 0 'False
Width = 480
End
Begin VB.Image cStar
Height = 480
Left = 3900
Picture = "ObjDraw.ctx":0627
Top = 120
Visible = 0 'False
Width = 480
End
Begin VB.Image cPolygon
Height = 480
Left = 3330
Picture = "ObjDraw.ctx":0931
Top = 90
Visible = 0 'False
Width = 480
End
Begin VB.Image cArc
Height = 480
Left = 2730
Picture = "ObjDraw.ctx":0C3B
Top = 90
Visible = 0 'False
Width = 480
End
Begin VB.Image cPicture
Height = 480
Left = 2160
Picture = "ObjDraw.ctx":0F45
Top = 90
Visible = 0 'False
Width = 480
End
Begin VB.Image cText
Height = 480
Left = 1650
Picture = "ObjDraw.ctx":124F
Top = 90
Visible = 0 'False
Width = 480
End
Begin VB.Image cEllipse
Height = 480
Left = 1140
Picture = "ObjDraw.ctx":1559
Top = 60
Visible = 0 'False
Width = 480
End
Begin VB.Image cRect
Height = 480
Left = 600
Picture = "ObjDraw.ctx":1863
Top = 60
Visible = 0 'False
Width = 480
End
Begin VB.Image cLine
Height = 480
Left = 60
Picture = "ObjDraw.ctx":1B6D
Top = 60
Visible = 0 'False
Width = 480
End
End
Attribute VB_Name = "ObjDraw"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
Public Type myObject
mObjectType As myObType
mTop As Single
mLeft As Single
mHeight As Single
mWidth As Single
mAngle As Single
mFillColor As Long
mFillStyle As myFill
mBorderColor As Long
mBorderWidth As Integer
mAspect As Single
mDeleted As Boolean
mPicture As StdPicture
mFontName As String
mFontSize As Single
mFontBold As Boolean
mFontItalic As Boolean
mFontUnderline As Boolean
mFontStrikethru As Boolean
mText As String
mTextAlign As AlignmentConstants
mPointQty As Integer
mPosX0 As Single
mPosY0 As Single
mPosX1 As Single
mPosY1 As Single
mPosX2 As Single
mPosY2 As Single
mPosX3 As Single
mPosY3 As Single
mGroupMember As Integer
End Type
Public Type myCoorType
posX1 As Single
posY1 As Single
posX2 As Single
posY2 As Single
posX3 As Single
posY3 As Single
posX4 As Single
posY4 As Single
CenterX As Single
CenterY As Single
End Type
Public Enum myObType
mline = 0
mArc = 1
mRectangle = 2
mEllipse = 3
mText = 4
mImage = 5
mPolygon = 6
mStar = 7
mRoundRectangle = 8
End Enum
Public Enum myOrder
BringToFront = 0
SendToBack = 1
BringFoward = 2
SendBackward = 3
End Enum
Public Enum myBool3
Unchanged = -1
mFalse = 0
mTrue = 1
End Enum
Public Enum myFill
mSolid = 0
mTransparent = 1
mHorizontalLine = 2
mVerticalLine = 3
mUpwardDiagonal = 4
mDownwardDiagonal = 5
mCross = 6
mDiagonalCross = 7
End Enum
Public Enum myAlignType
mLeft = 0
mCenter_V = 1
mRight = 2
mTop = 3
mCenter_H = 4
mBottom = 5
mCenter_V_H = 6
mCenterPage = 7
End Enum
Public Enum myChange
toLeft = 0
toTop = 1
toRight = 2
toBottom = 3
toWidthP = 4
toHeightP = 5
toWidthN = 6
toHeightN = 7
End Enum
Dim ObjList() As myObject
Dim ObjQty As Long
Dim ObjIndex As Long
Dim NewObj As Boolean
Dim isDown As Boolean
Dim isMove As Boolean
Dim onObject As Boolean
Dim isResize As Boolean
Dim toSize As Integer
Dim NextLine As Boolean
Dim NewText As Boolean
Dim mArrowStep As Integer
Dim myFont As String
Dim ListSel() As Long
Dim QtySel As Long
Dim Xmove As Single
Dim Ymove As Single
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -