473,657 Members | 2,566 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 5174
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.Cl ientSize.Width,
this.button1.Cl ientSize.Height );
this.button1.Re gion = new Region(gp);

--
Tim Wilson
..Net Compact Framework MVP

"AJ" <jh******@gmail .com> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.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
4698
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 based on a server name passed in, and whether ornot the PDA is in the active sync cradle. IE. If the PDA is in the cradle, use localhost. If the PDA isn'tin the cradle, then allow connection over wi-fi to any validwebservice by changing the computer...
4
3129
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 record only). What is the code i shall use in the Current Event of Form, in order to display the command button for each record (for null related text boxes). Thanks in advance
1
1297
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 pages. Thanks,
2
9030
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 selected by the user. I started out by setting up P/Invokes for LoadCursor and SetCursor. Calling LoadCursor followed by SetCursor does allow me to change to a different cursor, such as the cross cursor, but as soon as the application leaves...
8
7766
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 automatically creates a virtual directory and configures it. I am using the DirectoryServices.DirectoryEntry class in C# to do this. I am unable to set the .Net version of the virtual directory from 1.1 to version 2. All searches led me to the...
0
1376
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 forms too, and other objects.. thanks a lot..
1
2469
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 forms too, and other objects.. thanks a lot..
0
7531
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 write LinkButton_ClickHandler_Edit in my C# code. I have coded linkbutton as: LB1.Text = "Edit"; LB1.Click += new System.EventHandler(LinkButton_ClickHandler_Edit); Everything is fine as yet.
3
6868
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 button text should be changed to something else. For example, "Continue to step 5". Is it possible? Here is my code for generating steps: ============================== Protected Sub HitRaterWiz_Init(ByVal sender As Object, ByVal e As
0
8392
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1611
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.