473,771 Members | 2,347 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

shaped bnt

i want to make a shaped bnt like star or circle something
like that .(with the full code)
Jul 21 '05 #1
2 1578
http://msdn.microsoft.com/library/de...us/gdicpp/GDIP
lus/UsingGDIPlus/FillingShapeswi thaGradientBrus h/CreatingaPathGr adient.asp
"bershama" <th****@hotmail .com> wrote in message
news:02******** *************** *****@phx.gbl.. .
i want to make a shaped bnt like star or circle something
like that .(with the full code)

Jul 21 '05 #2
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.Graph icsPath()
m_path.AddEllip se(me.ClientRec tangle)
Me.Region = New System.Draing.R egion(m_path)

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

Hope this helps
Jay

"bershama" <th****@hotmail .com> wrote in message
news:02******** *************** *****@phx.gbl.. .
i want to make a shaped bnt like star or circle something
like that .(with the full code)

Jul 21 '05 #3

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

Similar topics

3
4359
by: skullcap | last post by:
Is there any way using HTML 4.01 of wrapping text and other inline elements into an 'L' or 'C' shaped space in a table - i.e. telling the browser that a series of table cells which don't form a square, line, or rectangle should all be considered as part of the same inline block? What i want it for is I'm using a two column table to display a series of images with text, and I want the images opposite the centre of each text section, with...
5
2551
by: vBOT | last post by:
Hi all, I have an odd shaped graphic I would like to use as my interface (see it here at http://www.mokee.com/vbot/ver3/face.jpg) The part I want to be transparent on the image is red. I set the background image of my form to be this image (actually a transparent png version), then I set the transparency key to red as well. Instead of the shaped form I thought I would have, I now have the graphic with a white border as my form. Is...
3
3316
by: James | last post by:
I have an picture cut out in a certain shape that I would like to make as my form. I have tried following the directions in MSDN on how to make shaped windows forms but their directions did not work for me. Does anyone know how I can set my irregular shaped picture as my form? Thanks for the help.
2
1905
by: Flix | last post by:
I need some help to handle the Region property of my Form in the correct way. Usually when I create shaped forms in my programs, I modify the Form.Region property, making it include only a part of the form client rectangle (I use a custom button to close my form). The problem is that when I want to go back to a normal shaped form at runtime, I use the following line of code: this.Region=new System.Drawing.Region(new...
4
2472
by: Publicjoe | last post by:
Hi guys, I am writing an app that I wish to have a transparent background and hence a shaped form. In the InitializeComponent() method I set the members of the form to the following: //-- Code ------------------------------------------- this.FormBorderStyle = FormBorderStyle.None; this.MaximizeBox = false;
4
2444
by: Failure | last post by:
As far as I know, Groupboxes only come in one shape, a rectangle. But on one of my forms, it would be best if I could have a groupbox that's shaped like this: _______ | | _________| | | | | | |_______________|
0
1682
by: dr | last post by:
C# Irregular shaped user controls. How to make usercontrol have transparency key for its background image? I want to have irregular shaped user controls on my form. like a funny shaped button. This works fine for irregular shaped forms becuase they have a transparency key field, but user controls dont have this field. note i do not want to see the desktop. I want to see any other controls or form behind the irregularly shaped user...
1
3572
by: PankajGaur | last post by:
Hi, I need to create a Ellipse shaped user control which have folloiwng attributes: 1) The edges are smooth 2) The control shuld only be selected when click on the ellipse shape & not when click on the empty area of Client Rectangle What I have done so far: I override the OnPaintMethod as below:
0
1377
by: =?Utf-8?B?UGFua2FqR2F1cg==?= | last post by:
Hi, I need to create a Ellipse shaped user control which have folloiwng attributes: 1) The edges are smooth 2) The control shuld only be selected when click on the ellipse shape & not when click on the empty area of Client Rectangle What I have done so far: I override the OnPaintMethod as below:
3
2291
vdraceil
by: vdraceil | last post by:
Hi everyone,i just wanted to know whether it is possible to hav different shaped command buttons in VB6.0?-i mean using oval shaped buttons,star shaped buttons,something like that in my forms just to enhance its appearance..
0
10260
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
10102
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...
0
9910
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8933
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6712
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
5354
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
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
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
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.