PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms separate visual objects: bevel/rectangle

Reply

separate visual objects: bevel/rectangle

 
Thread Tools Rate Thread
Old 08-02-2006, 11:49 AM   #1
=?Utf-8?B?UGV0ZXIgQmFyYW55aQ==?=
Guest
 
Posts: n/a
Default separate visual objects: bevel/rectangle


Hi,

I come from Delphi development, and I really miss the ability to separate
text boxes, and other visual elements on the form with ... something like
bevel was in Delphi. What I mean: in design time I would like to draw a
rectangle around some objects, or draw a horizontal or vertical line on the
form, what shows immediatelly on the screen.
Is there a such object collection? How do you used to do this? With Panels?
Isn't there too much overhead, if you use panels for this?

Thanks:

Peter
  Reply With Quote
Old 08-02-2006, 12:22 PM   #2
Dmytro Lapshyn [MVP]
Guest
 
Posts: n/a
Default Re: separate visual objects: bevel/rectangle

Hi Peter,

I recall such a trick can be done with labels. Set the text to an empty
string and enable a 3D border for the label. To get a horizontal or a
vertical line, set the height or the width respectively to 1px.

"Peter Baranyi" <PeterBaranyi@discussions.microsoft.com> wrote in message
news:F274C2DE-0B54-4319-B1C1-CFDA17726CA1@microsoft.com...
> Hi,
>
> I come from Delphi development, and I really miss the ability to separate
> text boxes, and other visual elements on the form with ... something like
> bevel was in Delphi. What I mean: in design time I would like to draw a
> rectangle around some objects, or draw a horizontal or vertical line on
> the
> form, what shows immediatelly on the screen.
> Is there a such object collection? How do you used to do this? With
> Panels?
> Isn't there too much overhead, if you use panels for this?
>
> Thanks:
>
> Peter



  Reply With Quote
Old 08-02-2006, 12:58 PM   #3
msnews.microsoft.com
Guest
 
Posts: n/a
Default Re: separate visual objects: bevel/rectangle

Hi Dmytro,

wow, really cool. Thanks for the idea!

Peter

"Dmytro Lapshyn [MVP]" <x-code@no-spam-please.hotpop.com> wrote in message
news:O9JxdpKLGHA.2912@tk2msftngp13.phx.gbl...
> Hi Peter,
>
> I recall such a trick can be done with labels. Set the text to an empty
> string and enable a 3D border for the label. To get a horizontal or a
> vertical line, set the height or the width respectively to 1px.
>
> "Peter Baranyi" <PeterBaranyi@discussions.microsoft.com> wrote in message
> news:F274C2DE-0B54-4319-B1C1-CFDA17726CA1@microsoft.com...
>> Hi,
>>
>> I come from Delphi development, and I really miss the ability to separate
>> text boxes, and other visual elements on the form with ... something like
>> bevel was in Delphi. What I mean: in design time I would like to draw a
>> rectangle around some objects, or draw a horizontal or vertical line on
>> the
>> form, what shows immediatelly on the screen.
>> Is there a such object collection? How do you used to do this? With
>> Panels?
>> Isn't there too much overhead, if you use panels for this?
>>
>> Thanks:
>>
>> Peter

>
>



  Reply With Quote
Old 08-02-2006, 03:22 PM   #4
Stoitcho Goutsev \(100\)
Guest
 
Posts: n/a
Default Re: separate visual objects: bevel/rectangle

Peter,

There is no beles as in VCL. Horizontal and Vertical line you can do by
using Panel with small width or height and 3D border. Don't worry about the
overhead in VCL they are implemented exactly like this.


--

Stoitcho Goutsev (100)

"Peter Baranyi" <PeterBaranyi@discussions.microsoft.com> wrote in message
news:F274C2DE-0B54-4319-B1C1-CFDA17726CA1@microsoft.com...
> Hi,
>
> I come from Delphi development, and I really miss the ability to separate
> text boxes, and other visual elements on the form with ... something like
> bevel was in Delphi. What I mean: in design time I would like to draw a
> rectangle around some objects, or draw a horizontal or vertical line on
> the
> form, what shows immediatelly on the screen.
> Is there a such object collection? How do you used to do this? With
> Panels?
> Isn't there too much overhead, if you use panels for this?
>
> Thanks:
>
> Peter



  Reply With Quote
Old 08-02-2006, 07:00 PM   #5
Herfried K. Wagner [MVP]
Guest
 
Posts: n/a
Default Re: separate visual objects: bevel/rectangle

"Peter Baranyi" <PeterBaranyi@discussions.microsoft.com> schrieb:
> I come from Delphi development, and I really miss the ability to separate
> text boxes, and other visual elements on the form with ... something like
> bevel was in Delphi. What I mean: in design time I would like to draw a
> rectangle around some objects, or draw a horizontal or vertical line on
> the
> form, what shows immediatelly on the screen.
> Is there a such object collection? How do you used to do this? With
> Panels?
> Isn't there too much overhead, if you use panels for this?


For boxes, check out the groupbox control.

Rules:

Wrapping Win32 Controls in .NET - Horizontal and Vertical Rules
<URL:http://www.codeproject.com/cs/miscctrl/hvrules1.asp>

Alternatively you can use a label control with width or height set to 2, and
'BorderStyle' set to 'Fixed3D' to create an inset line.

Shapes and lines:

Advanced Shape Control
<URL:http://www.codeproject.com/vb/net/advanced_shape_control.asp>

LineControls.exe
<URL:http://www.gotdotnet.com/team/vb/LineControls.exe>
<URL:http://download.microsoft.com/download/7/e/0/7e070297-47fe-4443-9194-ab57acd8ea01/LineControls.msi>

Creating transparent Windows Forms controls.
<URL:http://www.bobpowell.net/transcontrols.htm>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off