I'll be brief about it. The original code was NOT written by me - the author is a certain Mr. Dave Peckham whose article titled AquaButton: A sample custom button control with a Mac OS X look can be found at CodeProject.Com. The original code was written in C# though - and my development platform was VB.NET - so I ported the code to VB.NET and here I am posting it for all of you.
If you are unsure what an Aqua Button is - take a look at the following picture:
Right - as you can see this will help you change the look of you .NET applications entirely. For C# you can use the code by the original author - and for VB.NET you can use mine. You'll find all the code needed in the attachment with this post - along with three .png picture files titled:
Only flip side with this is - that the button is not compiled as a User Control and hence not accessible as a Form Designer component. (Maybe, I'll modify it soon to be one). Till then, you have to add the buttons to your project programmatically. A little explanation on that - if you look at the code view of you project (considering a blank form with only one button), inside the "Windows Forms Designer Generated Region", you'll see the standard windows default buttons are added similar to the following format:
Me.Button1 = New System.Windows.Forms.Button .... ....... Me.Button1.BackColor = System.Drawing.Color.LightGray Me.Button1.Location = New System.Drawing.Point (100, 100) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size (60,24) Me.Button1.TabIndex = 1 Me.Button1.Text = "OK"
If you delete your button in the designer - this code will go away. So make sure you note down the Location and Size of your buttons prior to deletion. Since the Aqua Button class inherits the Windows Button Class - all the default button properties are accessible in the Aqua Buttons too.
Towards the top of your code, above the windows forms designer generate region add in a statement:
Friend Withevents Button1 As WildGrape.Aqua.Controls.Button
Inside your Form_Load procedure add the following statements:
Button1 = New WildGrape.Aqua.Controls.Button Me.Controls.Add (Button1) 'The rest is the same as the syntax for the default buttons Me.Button1.BackColor = System.Drawing.Color.LightGray Me.Button1.Location = New System.Drawing.Point (100, 100) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size (60,24) Me.Button1.TabIndex = 1 Me.Button1.Text = "OK"
Compile your code and have fun
.:: Cheers ::.
Download the attachment (Zipped with WinZip 9):
AquaButton.zip 6.11K 1366 downloads
Download the attachment (Zipped with Windows Zipper):
Aqb.zip 6.09K 635 downloads