471,348 Members | 1,332 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Creating a 3D panel

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.
Jun 27 '08 #1
1 6120
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.
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Haim Ashkenazi | last post: by
3 posts views Thread by Dariusz Rajtak | last post: by
2 posts views Thread by Homer | last post: by
3 posts views Thread by Calvin Lai | last post: by
2 posts views Thread by DaWoE | last post: by
4 posts views Thread by Net Developer | last post: by
4 posts views Thread by Miner Jeff | last post: by
1 post views Thread by Ronak mishra | last post: by

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.