2024年6月10日发(作者:)

VB开简易的画图板

功能:VB开简易的画图板,使其具有画图板的各块功能VB

界面如下:

图二

Option Explicit

Dim i, drawact As Integer

Dim canline, canpen, canrubber, canenlarge, canellipse,

canrectangle, canflood, canget, canbrush As Boolean

Dim x0, y0, xnow, ynow, radius0, radius As Single

Dim Filename As String

Private Sub Form_Load()

' 初始化图片框的大小和AutoRedraw属性和窗体的标

=

=

draw = True

draw = True

e = LoadPicture()

Filename = "Untitled"

n = Filename

End Sub

Private Sub Label2_Click(Index As Integer)

' 选择某项操作时,将其下凹看上去像是被按下去的

For i = 0 To - 1

Label2(i).BorderStyle = 0

Next

Label2(Index).BorderStyle = 1

drawact = Index