By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,190 Members | 2,204 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,190 IT Pros & Developers. It's quick & easy.

Creating a custom control (star shaped...)

P: n/a
Ok.. I need to create a button. Not a normal one. I need one that has a
STAR shape. I need it to be yellow and with a face. When I rollover this
button I need the face to smile and to have sparkles comming out of the
button. When I click this button I need it to shake and have the face scream
(no sound required)... This button will be located over a composite
background so I would like to have transparent areas where my button is not
showing up. I would also appreciate to have antialising for the star edges
to make it all smooth.

I know this will all be easy and possible when longhorn.avalon is here...
How would you guys create this button control these days??? What if I need
to design or create a specific control to suit my needs...I only know hot to
drag and drop the existing controls... Thanks!

Arturo

Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Here is an article you might find helpful:

Shaped Windows Forms and Controls in Visual Studio .NET
http://msdn.microsoft.com/library/de...lstudionet.asp

HTH,

--
Scott
http://www.OdeToCode.com

On Mon, 19 Jan 2004 17:14:31 -0600, "Arturo Toledo"
<ar****@miltonfrank.tv> wrote:
Ok.. I need to create a button. Not a normal one. I need one that has a
STAR shape. I need it to be yellow and with a face. When I rollover this
button I need the face to smile and to have sparkles comming out of the
button. When I click this button I need it to shake and have the face scream
(no sound required)... This button will be located over a composite
background so I would like to have transparent areas where my button is not
showing up. I would also appreciate to have antialising for the star edges
to make it all smooth.

I know this will all be easy and possible when longhorn.avalon is here...
How would you guys create this button control these days??? What if I need
to design or create a specific control to suit my needs...I only know hot to
drag and drop the existing controls... Thanks!

Arturo


Nov 20 '05 #2

P: n/a
Cor
Hi Arturo,

A complete form in this way, just to give you an idea how to do it.

\\\Made by Herfried, changed by Fergus and Cor
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim g As New System.Drawing.Drawing2D.GraphicsPath
g.AddString( _
"Arturo", _
System.Drawing.FontFamily.GenericSansSerif, _
System.Drawing.FontStyle.Bold, _
200, _
New Point(0, 0), _
System.Drawing.StringFormat.GenericDefault _
)
Me.BackColor = Color.Red
Me.Region = New System.Drawing.Region(g)
g.Dispose()
Me.AutoScaleBaseSize = New System.Drawing.Size(0, 0)
Me.ClientSize = New System.Drawing.Size(800, 800)
Button1.BackColor = System.Drawing.SystemColors.ActiveCaptionText
Button1.ForeColor = System.Drawing.Color.Red
Button1.Location = New System.Drawing.Point(50, 40)
Button1.Size = New System.Drawing.Size(20, 20)
Button1.Text = "X"
End Sub
Private Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
Me.Close()
End Sub
///

I hope this helps a little bit?

Cor
Nov 20 '05 #3

P: n/a
Thanks guys. Your help was very useful for me to get started on this broad
subject.
--
='o'= Arturo ='o'=
www.miltonfrank.tv
"Arturo Toledo" <ar****@miltonfrank.tv> escribió en el mensaje
news:ut*************@TK2MSFTNGP11.phx.gbl...
Ok.. I need to create a button. Not a normal one. I need one that has a
STAR shape. I need it to be yellow and with a face. When I rollover this
button I need the face to smile and to have sparkles comming out of the
button. When I click this button I need it to shake and have the face scream (no sound required)... This button will be located over a composite
background so I would like to have transparent areas where my button is not showing up. I would also appreciate to have antialising for the star edges
to make it all smooth.

I know this will all be easy and possible when longhorn.avalon is here...
How would you guys create this button control these days??? What if I need to design or create a specific control to suit my needs...I only know hot to drag and drop the existing controls... Thanks!

Arturo

Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.