473,397 Members | 1,949 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,397 software developers and data experts.

Can I draw a rectangle on a form?

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 label, so I want to draw a rectangle and
lines on my form. I don't want them to have any user interaction whatever.
They would be there just to look pretty.

There's plenty of support for drawing rectangles from code. There seems to
be support for drawing rectangles from within a resource. But I don't see a
way just to draw a plain ordinary rectangle on a form at design time! We
could do it in VB6, if I remember correctly. Can't we do it in VB.Net?

Rob, who had hopes that our friends in Redmond finally figured out how to
give VB programmers something they could work with intelligently, but is
learning that the product isn't quite there yet.
Nov 20 '05 #1
1 3394
* "Rob Richardson" <no*******@n2net.net> scripsit:
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 label, so I want to draw a rectangle and
lines on my form. I don't want them to have any user interaction whatever.
They would be there just to look pretty.

There's plenty of support for drawing rectangles from code. There seems to
be support for drawing rectangles from within a resource. But I don't see a
way just to draw a plain ordinary rectangle on a form at design time! We
could do it in VB6, if I remember correctly. Can't we do it in VB.Net?


There are no Shape controls available in Windows Forms any more. You
will have to draw the rectangle at runtime, for example in the form's
overridden 'OnPaint' method.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2

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

Similar topics

6
by: Jay | last post by:
Hi everybody! Please help me with this problem. I try to write code for server side data validation. Initially, I have a html file called "form.html" which just contains all the necessary fields...
0
by: B-Dog | last post by:
I'm using this class here http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/html/printwinforms.asp to build a tabular print report and it works fine but when I try and add...
1
by: tejesht | last post by:
Hello everybody, I want to notify the user about a particular area on a image by drawing a rectangle around that area. Can any one suggest me for the same. Please specify the code too. ...
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...
0
by: Adam Clauss | last post by:
I have a ListView in which I am attempting to get it to not draw the 'dotted' rectangle around items which are selected. All other drawing should be normal. I am using the listbox in SmallIcon...
10
by: kimiraikkonen | last post by:
Hi, If previous post was missing, here's the complete one: I'm trying to draw a rectange on a picturebox image using mouse move event but the problem is that the rectangle selection / drawing...
0
by: Red Head | last post by:
Hello I've written some code to draw a rectangle on a picture box when the user moves the mouse. (the previous rectangle is cleared) This works fine but the very first rectangle is not removed...
0
by: joshguru | last post by:
i have a button in my form in vb.net.i have to click the button and i have to draw a rectangle by mouse....ie using button click event i have to draw as my desired size....
1
by: kummu4help | last post by:
hi, i want to draw rectangle based on mousedrag event. if user dragging the mouse, then the rectangle on the applet should increase or decrease basing on current mouse coordinates. i have the...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.