📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 7665
ClientLeft = 60
ClientTop = 345
ClientWidth = 10380
LinkTopic = "Form1"
ScaleHeight = 7665
ScaleWidth = 10380
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 615
Left = 4560
TabIndex = 1
Top = 6600
Width = 975
End
Begin VB.PictureBox Picture1
Height = 5535
Left = 960
ScaleHeight = 5475
ScaleWidth = 8355
TabIndex = 0
Top = 360
Width = 8415
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function FloodFill Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long
Private Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As Long
Private Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Private Sub Command1_Click()
Picture1.ScaleMode = 3
Picture1.Line (50, 50)-(300, 100)
Picture1.Line (300, 100)-(250, 300)
Picture1.Line (250, 300)-(50, 200)
Picture1.Line (50, 200)-(50, 50)
Dim hBrush As Long
Dim hOldBrush As Long
hBrush = CreateSolidBrush(RGB(255, 0, 0))
hOldBrush = SelectObject(Picture1.hdc, hBrush)
FloodFill Picture1.hdc, 100, 100, RGB(0, 0, 0)
SelectObject Picture1.hdc, hOldBrush
DeleteObject hBrush
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -