Home All Groups Group Topic Archive Search About

Permanent Rectangle on Form.

Author
27 Sep 2006 12:36 PM
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.

Author
27 Sep 2006 12:44 PM
Robinson
"T Clancey" <t***@idcodeware.co.uk> wrote in message
news:SaudnRlQkYMF7YfYnZ2dnUVZ8tOdnZ2d@bt.com...
> 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.
Author
27 Sep 2006 1:48 PM
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


Show quoteHide quote
"T Clancey" <t***@idcodeware.co.uk> wrote in message
news:SaudnRlQkYMF7YfYnZ2dnUVZ8tOdnZ2d@bt.com...
> 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.
>
Author
28 Sep 2006 10:54 AM
Stuart Nathan
create a bitmap and draw on it, and then use bitmap as backgroundimage
Author
28 Sep 2006 3:33 PM
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.

Show quoteHide quote
"Stuart Nathan" <stuart.nat***@homecall.co.uk> wrote in message
news:OMm3Kyu4GHA.3592@TK2MSFTNGP05.phx.gbl...
> create a bitmap and draw on it, and then use bitmap as backgroundimage
>