Link to home
Start Free TrialLog in
Avatar of ICSAutomation
ICSAutomationFlag for Switzerland

asked on

Rectangle in Windows forms

Hello
I want to paint a Rectangle in my Windows Form. I know the object Rectangle, which can be generated at runtime.
But how can I paint a Rectangle in the Designmode on my form (drag it from the toolbox) like other controls (f.e. button)
Is there a way to do this?
I work with VS 2010.
Avatar of EmuL8_sw
EmuL8_sw
Flag of South Africa image

Hi,

In the Toolbox just go to "Visual Basic PowerPacks"

There are a few shapes there

Hope this helps
SOLUTION
Avatar of webbphil
webbphil

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you can add a Panel control and change its BackColor
Avatar of ICSAutomation

ASKER

>> In the Toolbox just go to "Visual Basic PowerPacks"
Sorry, I forgot to mention that I Work with C#

I already created a UserContorl, inheritated from a Panel. But I also would like to have round corner, and there I don't know how to programm it.

You can use the Visual Basic Power pack in a C# Forms Application and you can set its corner radius as well.

So it will then have rounded corners
use PictureBox control
SOLUTION
Avatar of SAMIR BHOGAYTA
SAMIR BHOGAYTA
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
@samirbhogayta:
I'm lookin gfor a Contorl that I can pull from the toolbox

@abdkhlaif:
I can't make round corners in a PictureBox

@EmuL8_sw:
I don't want to install the Visual Basic Power pack
Sorry, I though Visual Studio 2010 comes standard with the Power Pack... Mine had it included and I didn't install any additional components/packs
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Is not exactly what I need, but I can us this solution aswell