Creating a 3D panel

  • Thread starter Thread starter Cdude
  • Start date Start date
C

Cdude

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.
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top