Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drawing Lines

Status
Not open for further replies.

domt

Programmer
Mar 13, 2001
115
0
0
US
The code: Line (0,0) - (100000,100000) draws a line on the form, but what is the code that draws a line inside a frame?
Any help would be appreciated
domt
 
just set the focus to the frame object prior to drawing the line.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
You can't set the focus of a Frame. And even if you could, a frame doesn't have any drawing methods so you would still need to draw on the form - and all such drawing sits below any placed controls...

Frankly a control such as Frame is a real bind to perform drawing operations on (if you want the drawing to remain persistent), so your best bet (unless you really want to get down and dirty with the API) is to place a borderless picture box inside the frame, and draw on that.

 
If all you want is a line in a frame, place a line control. you can move it around and change its color etc..
If your making table grids that size dinamically I agree with strongm, a picturebox is best.
 
Thank you all for your responses. A Picture Box works fine.
domt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top