 |
Asim-GDI GURU Level: Sage
 Registered: 29-07-2005 Posts: 54
|
My AirBrush Class..
Hi there,
I've made a class for creating original AirBrushes.I thought why don't share it with you guys.So check it out.
Way of using it:
Dim Brush As New AirBrush
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
Call Brush.Create(25, 25, RGB(Rnd()*255,Rnd()*255,Rnd()*255))
End If
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
Call Brush.Apply(Picture1.hDC, X, Y, 128)
Picture1.Refresh
End If
End Sub
Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
Call Brush.Release
End If
End Sub
|
Regards,
Asim Siddiqui.
[Edited by Asim-GDI GURU on 13-09-2005 at 05:18 PM GMT]
____________________________ Attached:
AirBrush.zip 2 KB (Downloads: 9)
|
|
13-09-2005 at 12:11 PM |
|
|
Asim-GDI GURU Level: Sage
 Registered: 29-07-2005 Posts: 54
|
Re: My AirBrush Class..
Hi there,
I got the problem with you.You didn't set the Picture1's scalemode to 3-Pixel.simply do this either at the time of designing or do that in the code by inserting Picture1.ScaleMode = 3 in the Picture1_MouseDown
.
I hope it'll work then.Please do comment when it runs well...
Regards,
Asim Siddiqui.
|
|
13-09-2005 at 04:01 PM |
|
|
Asim-GDI GURU Level: Sage
 Registered: 29-07-2005 Posts: 54
|
Re: My AirBrush Class..
Hi there,
I got the problem with you.You didn't set the Picture1's scalemode to 3-Pixel.simply do this either at the time of designing or do that in the code by inserting Picture1.ScaleMode = 3 in the Picture1_MouseDown
.
I hope it'll work then.Please do comment when it runs well...
Regards,
Asim Siddiqui.
|
|
13-09-2005 at 04:01 PM |
|
|
|
|
 |
 |