Permanent Rectangle on Form.

  • Thread starter Thread starter T Clancey
  • Start date Start date
T

T Clancey

Hi, I have some code that will draw a rectangle on my form, does what I
need, but it's simple code that just draws, therefore menus and other items
clear the drawing.

Has anyone got a way to draw the rectangle permantently? I need to change
the size of the rectangle from time to time so I can't load an image.

Cheers,
Tull.
 
T Clancey said:
Hi, I have some code that will draw a rectangle on my form, does what I
need, but it's simple code that just draws, therefore menus and other
items clear the drawing.

Has anyone got a way to draw the rectangle permantently? I need to change
the size of the rectangle from time to time so I can't load an image.

Cheers,
Tull.

Where are you doing the drawing? If you are handling a Paint method, it
should automagically redraw. If you are drawing elsewhere it will be
overwritten.
 
If its just a box you need...
Cant you put an Image box on the form, give it a borderstyle, and the same
background color as your form?
and put ur objects on top?
Its like a fake box.

Or use an image and set the image.stretch to true. Change the size during
ur code.

I miss the "line" draw feature in the old vb's.

Miro
 
Thanks to everyone for their input, I founds that creating a picture box,
sizing it as required, then drawing the labels on the box did just what I
need.

There is another problem, which I'll put in a new post!

Thanks again,
Tull.
 
Back
Top