borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Unicode Textbox with API?)Next Topic (See My Program..) New Topic New Poll Post Reply
AndreaVB Forum : API : My AirBrush Class..
Poster Message
Asim-GDI GURU
Level: Sage

Registered: 29-07-2005
Posts: 54

icon 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
View Profile Send Email to User Show All Posts | Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1156
icon Re: My AirBrush Class..

I can't get it to work . What am I doing wrong pls.


Steve  

[Edited by steve_w on 13-09-2005 at 03:04 PM GMT]

13-09-2005 at 03:03 PM
View Profile Send Email to User Show All Posts | Quote Reply
Asim-GDI GURU
Level: Sage

Registered: 29-07-2005
Posts: 54
icon 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
View Profile Send Email to User Show All Posts | Quote Reply
Asim-GDI GURU
Level: Sage

Registered: 29-07-2005
Posts: 54
icon 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
View Profile Send Email to User Show All Posts | Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1156
icon Re: My AirBrush Class..

And the picturebox autoredraw property to true

Very nice work, i'll have to try and think of a use for it now


Steve  

14-09-2005 at 11:31 AM
View Profile Send Email to User Show All Posts | Quote Reply
Asim-GDI GURU
Level: Sage

Registered: 29-07-2005
Posts: 54
icon Re: My AirBrush Class..

thanks for the compliment.I got two new functions in it.Using them user can now define his own graphic(a two-coloured picture, where one is used as tranparent) to be used as the brush.Please check it sir.Although its still under construction but the main structure is working.

Best Regards,
Asim Siddiqui.


____________________________
Attached:
AirBrush.zip 102 KB (Downloads: 2)

15-09-2005 at 12:16 PM
View Profile Send Email to User Show All Posts | Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1156
icon Re: My AirBrush Class..

I just drew all over your car

15-09-2005 at 01:16 PM
View Profile Send Email to User Show All Posts | Quote Reply
Asim-GDI GURU
Level: Sage

Registered: 29-07-2005
Posts: 54
icon Re: My AirBrush Class..

A better version of my class is now available..


____________________________
Attached:
AirBrush.zip 3 KB (Downloads: 3)

16-07-2006 at 11:03 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : API : My AirBrush Class..
Previous Topic (Unicode Textbox with API?)Next Topic (See My Program..) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder