473,398 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

round or oval shaped buttons using C#

hii...
plz help me out ,how to create rounded or oval buttons using c# in VS 2005.
Dec 9 '08 #1
3 18122
nukefusion
221 Expert 100+
Probably the easiest way is to set the region of the button. Subclass Button and adjust the Region with code similar to this:

Expand|Select|Wrap|Line Numbers
  1.  public class ShapedButton : Button
  2.     {
  3.         protected override void OnResize(EventArgs e)
  4.         {
  5.             base.OnResize(e);
  6.             GraphicsPath gp = new GraphicsPath();
  7.             gp.AddEllipse(new Rectangle(Point.Empty, this.Size));
  8.             this.Region = new Region(gp);
  9.         }
  10.     }
Dec 9 '08 #2
Plater
7,872 Expert 4TB
That same concept can be applied to custom shaped forms.
Dec 9 '08 #3
here is a solution I saw recently...
http://www.youtube.com/watch?v=K_JzL4kzCoE
Feb 1 '13 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Poker Man | last post by:
Hi, I know how to do Sumbit buttons in Forms, and I know how to do custom buttons in Javascript. What I can't seem to find is how to do custom Submit buttons using Javascript! Anybody out...
0
by: satish | last post by:
.Hi, Can anybody help me!!!!!! how to automate selection of radio buttons using vb.net. I am using mshtml.htmldocument Public Sub OpenDownloadDataPage(ByRef wbBrowser As...
0
by: nevada17 | last post by:
My goal is to find a way to apply scroll bars across the y axis of about 25 check buttons so that my interface isn't too large. I've read about scroll bars and I realize that's its not possible to...
0
by: vabsjava | last post by:
Hello Everybody..... I want to use command button which is oval in shape..... how to convert the button shaped in rectangle to oval.... please me in this regard... Thank You
1
by: ShambhuHubli | last post by:
Hi ! I am developing front end for some application using Python Tkinter. And I am new to this GUI development. In my application, I have to create buttons other than square or rectangle. I want...
2
by: RichmondJim | last post by:
I'm a newbie when it comes to CSS and I tried to incorporate menu buttons using CSS on to our site. It works great (IMHO) in IE6, but someone emailed me that it's really crappy in FF2, so I...
3
by: kalyanibal | last post by:
can anybody help me out with my problem. in my submit form i have three radio buttons with the title "Mr,Mrs,Miss". how to select one radio button from the above three by using c# code behind....
2
by: KiranJyothi | last post by:
Hi All, I want to draw some rectangles and then add some buttons. Actually, in my project I have to give user control. This project is about transmitting and receiving packets. When the user...
5
by: satyabhaskar | last post by:
hi all, In my web page i have created radio buttons dynamically on to the page .....following is my code string Course, Semester, Section; int rowsCount; string con =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.