shaped bnt

  • Thread starter Thread starter bershama
  • Start date Start date
B

bershama

i want to make a shaped bnt like star or circle something
like that .(with the full code)
 
Bershama,
What do you mean by bnt?

Do you mean button?

Set the Control.Region property of your button to the shape you want. You
can use a GraphicsPath object to create the region.

I normally put the following code in both the constructor & the Resize event
(a subroutine called from both).

For an round button try something like:
m_path = New System.Drawing.Drawing2D.GraphicsPath()
m_path.AddEllipse(me.ClientRectangle)
Me.Region = New System.Draing.Region(m_path)

Then as William suggested you can use a PathGradientBrush to paint it.

Hope this helps
Jay
 

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

Similar Threads


Back
Top