473,503 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing the Shape of Button Programatically

AJ
Hi guys,
any clues or suggesstion on how to programatically change the shape of
a button from rectangular to say elliptical or circular. Meaning that
when the mouse hovers just within the shape, only then the Click event
can be generated.
Would be Great if you guys can help

Code can be either in C# or VB.Net
Thanx
AJ

Nov 17 '05 #1
1 5167
You can use the GraphicsPath class to define the shape and then use the
Region class to turn that shape into a clipping region that can be assigned
to a control...

GraphicsPath gp = new GraphicsPath();
gp.AddEllipse(0, 0, this.button1.ClientSize.Width,
this.button1.ClientSize.Height);
this.button1.Region = new Region(gp);

--
Tim Wilson
..Net Compact Framework MVP

"AJ" <jh******@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hi guys,
any clues or suggesstion on how to programatically change the shape of
a button from rectangular to say elliptical or circular. Meaning that
when the mouse hovers just within the shape, only then the Click event
can be generated.
Would be Great if you guys can help

Code can be either in C# or VB.Net
Thanx
AJ

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4690
by: Nick via .NET 247 | last post by:
I have a similar problem trying to use web services with awindows form application. I currently use a static web referencein my project. What I am trying to do is to programaticallychange the url...
4
3122
by: Francis | last post by:
Hello i have a continuos form, and i have a command button to help insert information on a control textbox. But when the text box is not null, i dont want the command button to show (to the current...
1
1290
by: BobLaughland | last post by:
Hi There, Just wondering if in ASP .NET 2.0 C# you can change the web page programatically? I am wanting to click a button, perform some code in the button click function, and then change...
2
9016
by: Jim Frazer | last post by:
Hi, I'm working on an application in C# that will allow the user to create simple CAD drawings on a CEPC system. I would like to be able to change the cursor shape depending on the drawing mode...
8
7751
by: Rak | last post by:
I am looking for a way to programatically change the .net version of the virtual directory that I am creating within a aspx page. As part of creating a new customer in my asp.net 2 application, it...
0
1372
by: Peter Timbol | last post by:
Hi guys, can somebody teach me how to change the appearance of objects/controls in vb6. For instance i want to change the regular square shape command button into a round shape. Is that posible? in...
1
2462
by: Peter Timbol | last post by:
Hi guys, can somebody teach me how to change the appearance of objects/controls in vb6. For instance i want to change the regular square shape command button into a round shape. Is that posible? in...
0
7524
by: OceanBreeze | last post by:
I have added a LinkButton to the web page programatically from server side code using ASP 2.0 and C# in my Page_Load method. I also associate this LinkButton with a LinkButton_ClickHandler_Edit and...
3
6859
by: M. Ali Qureshi | last post by:
Hi, I have a wizard in my aspx page, and i create steps programatically. There are about 8 steps in all. The default text for StepNextButton is "Next". But i want that only in step 4, the next...
0
7199
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
7076
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7323
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...
1
6984
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
5576
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5005
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...
0
3162
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
732
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
377
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.