tags:

views:

37

answers:

2

I'm trying to get data from a database in order to draw a line on a vb6 form. I was looking at this site, but I'm not even a beginner in vb6, and I really couldn't follow it.

If anyone has any suggestion, even if it's just about drawing a line in vb6 (not dynamically), I'd appreciate it. Thanks!

A: 

The easiest way might be just to manipulate the height and width of a textbox or label programmatically.

txtTextbox.width = MyDatabaseValue
me.Repaint

EDIT: Have a look here: http://msdn.microsoft.com/en-us/library/9dtfzwyx(VS.80).aspx

Robert Harvey
I'm confused. I want to draw a line across the form. It has nothing to do with a textbox or label
chama
See my edit....
Robert Harvey
+1  A: 

Here's one way you dynamically draw a line:

    Me.Line (x1, y1)-(x2, y2)

Basically, this allows to to draw a straight line from one co-ordinate to another; for example:

    Me.Line (10, 10)-(1000, 1000)

You could just replace these values with values from the DB.

pm_2
This is actually what I ended up doing.
chama