Permanent Rectangle on Form.

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.
 
R

Robinson

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.
 
M

Miro

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
 
T

T Clancey

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top