PC Review


Reply
Thread Tools Rate Thread

Creating a 3D panel

 
 
Cdude
Guest
Posts: n/a
 
      24th Jun 2008
Hello. I need to make a 3D panel. At the moment i am using

private void panel1_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
Rectangle r = ClientRectangle;

Border3DStyle style = Border3DStyle.RaisedInner;
ControlPaint.DrawBorder3D(g, r, style, Border3DSide.All);


}
I need a more Raised look than this. And i need all the sides to be
raised.
 
Reply With Quote
 
 
 
 
Morten Wennevik [C# MVP]
Guest
Posts: n/a
 
      24th Jun 2008
Hi,

Border3DStyle.Raised will give a more raised look than RaisedInner, but I
suspect your real problem is using the parent ClientRectangle instead of
panel1.ClientRectangle. Try changing the line to

Rectangle r = panel1.ClientRectangle;

Btw, you don't need to specify Border3DSide if you want all sides to be
painted.

--
Happy Coding!
Morten Wennevik [C# MVP]


"Cdude" wrote:

> Hello. I need to make a 3D panel. At the moment i am using
>
> private void panel1_Paint(object sender, PaintEventArgs e)
> {
> Graphics g = e.Graphics;
> Rectangle r = ClientRectangle;
>
> Border3DStyle style = Border3DStyle.RaisedInner;
> ControlPaint.DrawBorder3D(g, r, style, Border3DSide.All);
>
>
> }
> I need a more Raised look than this. And i need all the sides to be
> raised.
>

 
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
Creating a sliding navigation panel =?Utf-8?B?QW50?= Microsoft ASP .NET 1 6th Nov 2007 07:44 PM
Creating a FlowLayout panel in .NET CF v2 =?Utf-8?B?TW9iaWxlTWFu?= Microsoft Dot NET Compact Framework 0 17th Sep 2006 07:42 PM
Creating custom Panel Control =?Utf-8?B?RGFpc3VrZQ==?= Microsoft Dot NET Framework Forms 0 18th Nov 2004 04:19 PM
Creating control panel applet using C# =?Utf-8?B?cmFqYW5p?= Microsoft C# .NET 0 1st Jul 2004 08:29 AM
Creating an Instance of a Panel Philip Tepedino Microsoft Dot NET Framework Forms 1 10th Oct 2003 07:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:47 AM.