Private Sub Command1_Click()
Dim X As Double
Dim Y As Double
Y = 0
Do While (Y <= 512)
X = 0
Do
Picture1.PSet (Y, X), RGB(255, 0, 0)
X = X + 2
Loop While X < 512
Y = Y + 2
Loop
End Sub
Private Sub Command2_Click()
On Error GoTo ErrHandler
CommonDialog1.Filter = "*.bmp|*.bmp"
CommonDialog1.ShowSave
SavePicture Picture1.Image, CommonDialog1.FileName
Exit Sub
ErrHandler:
Exit Sub
End Sub
Private Sub Form_Load()
Picture1.Width = Picture1.ScaleX(512 + 2, Picture1.ScaleMode, 1)
Picture1.Height = Picture1.ScaleY(512 + 2, Picture1.ScaleMode, 1)
Command1.Left = Picture1.Left + Picture1.Width + 200
Command2.Left = Command1.Left
Me.Height = Picture1.Height + Picture1.Top + 800
Me.Width = Command1.Left + Command1.Width + Picture1.Left
End Sub
[此贴子已经被作者于2007-8-13 19:58:56编辑过]