A step by step tutorial teaching you how to create your own chat client and chat server easily in C#, for local networks or the Internet.
A C# tutorial showing you how to make use of WMI to extract information on disk drives, such as model, capacity, sectors and serial number.
This tutorial will teach you how to calculate the shipping cost based on the weight, height, length and depth of the box, the distance and the UPS service type.
Creating a Rich Text Editor using JavaScript is easier to do than you might think, thanks to the support of modern browsers; this tutorial will walk you through it.
Basic drawing programThis tutorial doesn't just show you how to make a simple drawing program, it also teaches you things like error handling. Good for beginners who want some hands-on approach. |
On Sunday, March 21st 2004 at 07:05 PM By Andrew Pociu (View Profile) ![]() ![]() ![]() ![]() (Rated 4.5 with 48 votes) |
||
|
Contextual Ads
More Visual Basic Resources
Advertisement
Basic drawing program
Dim drawing
'vbOK + vbInformation' is the type of 'MsgBox' we want, one with an OK button and vbInformation icon. If this tutorial will get a high rate maybe it will continue with a part II, where you'll learn how to make your program draw shapes and other things . |
|||
Digg It!
Del.icio.us
Reddit
StumbleIt
Newsvine
Furl
BlinkList
|
|||
|
|||
Current CommentsAnother way to ease your work is Visual Basic is using arrays.
For instance, instead of creating 3 scrollbars and 3 textboxes with different names we would create an index array for controls (use the same name but modify the Index field value). After creating these arrays (scrollbars and textboxes) you will notice that in your Procedures, a new parameter appeared "Index as Integer" on the first place.
So instead of:
Private Sub VScrollRed_Scroll()
VScrollRed_Change
End Sub
you'll have:
Private Sub VScroll_Scroll(Index as Integer)
VScroll_Change (Index)
End Sub
and furthermore:
Private Sub VScroll_Change(Index as Integer)
shpCurr.BorderColor = RGB(VScroll(0).Value, VScroll(1).Value, VScroll(2).Value)
txtVal(2).Text = VScroll(2).Value
End Sub
Well, I hope you got the big picture of it.
Conclusion: by using control arrays and variable arrays you shorten the length of your source code and create an easier to understand code.
Thanks for your tutorial, i am studing Visual Basic and i have been reading and trying to get a hang of it but i could never get a book that would actually show how to code. They always showed you the basics or an overview. thanks really helped
great
A good tutorial, some more images would of been nice but the code is fine so thats all that matters.
Finally, a tutorial i can understand, the tutorials at www.microsoft.com and wrox tutorials had me stuck, cheers Andrei, im finally going somewhere
jake
Thank You. I'm downloaded your source code
Sweet code ... Thanx
Thanks, this code is amazingly simple and works perfectly. I've used this tutorial to make my own small drawing program which works like a dream.
i am a begineer student of vb. the above code looks so simpler and i have thought it will work perfectly
EXCELLENT TUTORIAL FOR BEGINNERS.
M.RAMESH KUMARR
thank you very much for the tutorial, i needed that for my project and now i have learned a lot from you..thanks again..
really well put together tutorial, infortunately since i am using VS.Net i cant get it to work, i tried coding from what you have written above, but i ran into a problem at the pct.DrawWidth, that among other things is different from the verision you used and the one im using, i used its upgrade wizzard on your code, but it still wont compile, none the less still a great tutorial i would love to figure out how to code one day
We need advice on how we can develop advanced drawings (Mechanical Gear) using visual Basic Graphics.
We thank you in advance for your anticipated cooperation.
3ew
This is a good guide, helped me with a class project!
Can you post the program that u made?
I'm a bit confused with the codes...
plz send me the code to implement paint brush in java painter. (as early as possible).
Thnx for sharing^^. It's really a great help!
ang tae tae nmn
ang tae tae nmn
ang tae tae nmn
Hi
Related Tutorials
Related Source Code
Visual Basic Job Search