PC Review


Reply
Thread Tools Rate Thread

Can I draw a rectangle on a form?

 
 
Rob Richardson
Guest
Posts: n/a
 
      12th Apr 2004
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.


 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      12th Apr 2004
* "Rob Richardson" <(E-Mail Removed)> 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/>
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Draw a rectangle Praveen Microsoft ASP .NET 1 24th Feb 2005 06:12 PM
Draw a Rectangle? Brad Shook Microsoft VB .NET 6 16th Nov 2004 10:15 PM
Print Draw Rectangle B-Dog Microsoft VB .NET 0 13th Sep 2004 02:43 PM
Who can draw exactly 1cm x 1cm rectangle in Excel =?Utf-8?B?RXhjZWxsZXI=?= Microsoft Excel Crashes 0 3rd Jun 2004 10:56 PM
draw inverted rectangle meicher Microsoft C# .NET 1 14th Jan 2004 07:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:04 PM.