473,394 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Permanent Rectangle on Form.

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.
Sep 27 '06 #1
4 1537

"T Clancey" <tu**@idcodeware.co.ukwrote in message
news:Sa******************************@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.
Sep 27 '06 #2
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 Clancey" <tu**@idcodeware.co.ukwrote in message
news:Sa******************************@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.

Sep 27 '06 #3
create a bitmap and draw on it, and then use bitmap as backgroundimage
Sep 28 '06 #4
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.

"Stuart Nathan" <st***********@homecall.co.ukwrote in message
news:OM**************@TK2MSFTNGP05.phx.gbl...
create a bitmap and draw on it, and then use bitmap as backgroundimage

Sep 28 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: CFW | last post by:
References in Access and .mdb files have always been painful for me - just when I thought I was OK in an .mdb, I have a .adp I'm working on and I need to use Set db as CurrentDb - Constant "object...
1
by: cider123 | last post by:
I've tried working with the SelectedIndices and Items.Selected attributes to get the problem to go away, but not having any luck. Questions I have are: 1) How do you move (using code) the...
3
by: Colin McGuire | last post by:
Hi there. I have written a small procedure to draw various shapes on things. A bit of it is shown below. Private Sub drawShape(ByVal shapeType As Integer, ByRef g As Graphics) Select Case...
4
by: Colin McGuire | last post by:
Hi, this is a really simple question I have been banging my head on a brick wall over. The program below changes the background colour of a form depending on whether the cursor is inside a...
1
by: Rob Richardson | last post by:
Greetings! I am creating a form that will contain information that will eventually be on a label. The label has a 2-column table with lines separating the cells. I want my form to resemble the...
3
by: Rod Gill | last post by:
Hi, VB.Net, Visual Studio 2003, Windows Application I want to avoid the old Windows rectangle shape, but I don't need or want complex bitmaps. What's the easiest way to create a form with...
5
by: DazedAndConfused | last post by:
I have a rectangle around text that I want to fill in with color. I do not know the height of the rectangle until I actually go through and draw out the text. Is there a way of filling in the...
1
by: Jeff Waskiewicz | last post by:
Hello All, I'm trying to solve a nagging problem. The goal is to draw a rectangle over the top of all the other controls on a form. Specifically, over a ChartFX control. The user would draw...
6
by: maifs | last post by:
i made 3 forms . 1.. frmMain(it is the mdiContainer) (form) 2........frmEditable (form) 3....... frmTools (form) now i just want that when i click on the rectangle button from frmTools form a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.