Im a first year students, its my first time to use vb i know less about vb. Were already having grraphics in our class and im not good at it. Will you help me draw a simple see saw, cube, and a self profile


Recommended Answers

All 6 Replies

Have you tried the Line statement?

Line x1, y1, x2, y2, colour (can use QBColour() func), something, B (box) or BF (Filled box)

Sorry its been a while since i programmed in VB but:

Line 0, 0, Me.ScaleWidth, Me.ScaleHeight, RGB(255, 255, 0), , BF

as i remember fills the screen to yellow

i forgot... There is also:

Circle x, y, raduis, colour

You can also use win32 api functions as these will offer better performance. This is because VB Refreshed the graphics after every GFX statement. Try drawing a square by drawing horizontal lines, then by drawing a diagonal with the BF option. You will see the difference. By using win32 api calls you can draw all your graphics then refresh the graphics. The graphics system is one of my reasons for learning other languages than VB :(

Learn to use the DRAW command and you can make ANYTHING!

hi, if r not seriour about graphics in vb. go for u can find in mdsn help. search with keyword circle,line,shape. like that. but, i am very much intrested in graphics programing but, vb not supporting very much. all the best

try these codes. it gives your project a really cool effect.

Private Sub Form_Click()
While 1
For i = 0 To 10 Step 0.001
Circle (Me.Width / 2 + Sin(i) * 2000, Me.Height / 2 + Cos(i) * 2000), 3000, i * j * 1000 + 30
j = j + 100
End Sub

Good Luck!!

please if you have acode for electromagnetic field plotter post to me or e mail

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.