VB.NET: How To Create Aqua Buttons - Pulsing & with rounded edges like OS-X

Pages: 1, 2
free web hosting

Read Latest Entries..: (Post #11) by iGuest on Mar 6 2008, 06:55 AM. (Line Breaks Removed)
vb.net animated button creation VB.NET: How To Create Aqua Buttons How to create animated button in vb.Net.-question by guna
Read the FIRST post of this Topic. - Express your Opinion! Contribute Knowledge :-).

Free Web Hosting > Computers & Tech > How-To's and Tutorials > Programming > .NET (VB, C# & J#)

VB.NET: How To Create Aqua Buttons - Pulsing & with rounded edges like OS-X

miCRoSCoPiC^eaRthLinG
Hi all,
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.

    [/tab]If you are unsure what an Aqua Button is - take a look at the following picture:
user posted image

[tab]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:
  • left.png
  • right.png
  • fill.png
    [/tab]These make up the left, right and body of the button. Feel free to relpace these with any other color - try experimenting with different kind of edge shapes and fill body. The fourth file in the zip is the main AquaButton.vb class that will draw the aqua button on your forms. You have to include all 4 files in your project and preferrably leave the .png files in the directory from which your application will run. That is necessary for the code to be able to load the pictures that give the button it's custom shape.

[tab]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:
CODE

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"


    [/tab] 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.

[tab]Towards the top of your code, above the windows forms designer generate region add in a statement:
CODE

Friend Withevents Button1 As WildGrape.Aqua.Controls.Button


     Inside your Form_Load procedure add the following statements:
CODE

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 smile.gif
.:: Cheers ::.

Download the attachment (Zipped with WinZip 9):
Click to view attachment

Download the attachment (Zipped with Windows Zipper):
Click to view attachment

 

 

 


Reply

Ryan
Interesting code, bit why would you want an aqua button, that makes no sense to me, that would be like if somone created a ipb skin to look like the defualt skin of another BBS. where is the pride of your os to use its buttons?

Reply

miCRoSCoPiC^eaRthLinG
Don't you get bored by the standard windows buttons ?? That was one of the primary reasons I took the pain to convert this code from C#... But it's not just limited to aqua buttons - if you modify the image files, and a little bit of the code - you can infact put ANY shape/size/color of buttons in your appz. That's the cool part about this code.. I'll try posting a small followup on howto do it. Believe me, it can completely change the look of your app

Reply

vizskywalker
I think it is a great idea, and I can't wait for a follow up. Now if only I had a full version of VB instead of the introductory version. Thanks microscopic^earthling.

Reply

h3lium
interesting idea, i had never thought of this. do you have the c# code or a link to it?

Reply

miCRoSCoPiC^eaRthLinG
QUOTE(h3lium @ Aug 11 2005, 01:56 AM)
interesting idea, i had never thought of this. do you have the c# code or a link to it?
*



Look right up on top of the first article. The original C# article that is cited as the C# version of this code is itself the link ..

Reply

willytb
Can't seem to unzip the attachment with WINXP unzipper? Do I need a special unzip program?


Notice from miCRoSCoPiC^eaRthLinG:
Please stop quoting a whole post when your feedback is just one line.

Reply

miCRoSCoPiC^eaRthLinG
I don't know about WinXP unzipper - I never trusted it much. I packed this file using Winzip v9 - which you can download from http://www.winzip.com Infact it's in version 10 now - but that wouldn't be a problem. I downloaded the file and tested it again - no problem with Winzip or WinRAR (http://www.winrar.com)

Reply

warbird
I tried to unzip it with WinRar but it gives errors all the time:

QUOTE
Unknown method in right.png
Unknown method in fill.png
Unknown method in left.png
Unknown method in AquaButton.vb
No files to extract


Where did you zipped it with? Could you reupload it? plzzzzz *begging* or do you want me to download winzip?

-=jeroen=-

Reply

miCRoSCoPiC^eaRthLinG
Cool - I've added another ZIP with the same files, this time zipped using Windows default zipper in Normal compression mode. The file is called Aqb.zip - you'll find it attached to the first post.

Reply

Latest Entries

iGuest
vb.net animated button creation
VB.NET: How To Create Aqua Buttons

How to create animated button in vb.Net.

-question by guna

Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Pages: 1, 2
Recent Queries:-
  1. round button for vb 2008 - 0.19 hr back. (1)
  2. button custom shape vb.net - 0.32 hr back. (1)
  3. how to make buttons in vb - 0.78 hr back. (1)
  4. round buttons in vb - 0.88 hr back. (1)
  5. vb.net buttons - 1.16 hr back. (1)
  6. how to change the shape of button into round in vb.net - 3.91 hr back. (1)
  7. differnt shapes of tab pages vb.net - 4.00 hr back. (1)
  8. how to click .vbs file in c# button code - 5.13 hr back. (1)
  9. button in vb.net - 6.49 hr back. (2)
  10. round buttons vb.net - 9.93 hr back. (1)
  11. create shape in vb.net - 2.80 hr back. (2)
  12. c# round buttons - 14.90 hr back. (1)
  13. aqua button vb.net - 15.38 hr back. (1)
  14. vb.net windows handle hover - 15.54 hr back. (1)
Similar Topics

Keywords : vb, net, howto, create, aqua, buttons, pulsing, and, rounded, edges, osx

  1. What You Need Before You Can Create A Text-based Game..
    Using PHP, HTML and MySQL (7)
  2. Create An Ftp Server On Your Pc With Serv-u
    Create An Ftp Server On Your Pc With Serv-u (1)
    QUOTE Create An Ftp Server On Your Pc With Serv-u Requirements: Serv-U No-IP.com Website
    Quote: Step 1. Getting a static IP address. Get a static address for your FTP server. You will want
    to do this as opposed to using your IP address for several reasons. First, it’s easier keeping
    up-to-date. Imagine having to change all of your setting every time your IP changed. With No-IP, the
    No-IP service runs in background on your computer and updates your current IP address with your FTP
    server’s URL (for example, you get ftp://rkchoolie.serveftp.com) . Second reason, yo....
  3. Create An Animation With Powerpoint
    (1)
    Create an Animation With Powerpoint Get your idea for the animation. Estimate how long
    this story will take you and how many slides it will be and see if you still feel like doing it.
    If you still want to try, create the layout for the first scene. Draw whatever background is
    necessary for your story. Create/Draw the character(s). For the second slide, you don't
    have to redraw the whole thing. Just duplicate the slide and move whatever needs to be moved for
    the desired animation! Continue duplicating and repeating these steps for howev....
  4. How Do You Create A Vista?
    (21)
    I'm wondering how people use computer software to create a vista. I know that I can go onto
    Google or Yahoo! or whatever and download different vistas, but I was wondering if I could make
    my own that would be realistic. What programs do you recommend? I would prefer free, open-source
    software that preferably works on Linux. As for the companies providing CDs/packages of vistas, do
    they actually create it themselves or do they have to go to take them? Just wondering.....
  5. How To Create A "user Profile" Page.
    No design (easy to add later if you want). (14)
    Hi! It was a long time ago I created a tutorial, so I've decided to create a new one
    /wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> This time, I am
    going to teach you, how to create a "user profile page". Lets say I am logged in on my account, and
    want to view someone else account information (in this case, only his username, but you can add more
    things later). Then I'll press on a link, that will take me to his user profile. But before
    you can do that, you will have to create a register script, and a login script. If y....
  6. Website Navigation Hover Buttons Stick So Made Css Today
    need further help with tutorial from this site (7)
    Hi I made hover buttons to go into my friends website because frontpage didn't allow the text on
    their buttons to be left aligned. Anyway, I think they stick a lot and i'm not happy with them.
    I have read a lot of people don't like the time it takes for java applets to load either so
    thought I should try doing the navigation buttons with the CSS shown on this site. I was so happy
    when after following the instruction my buttons turned out fine but the probem is that they have a
    solid border around each button and i want my nav bar to look like it's under....
  7. Easiest Free Forum To Create Custom Skin For?
    (2)
    What free forum is it easiest to create custom skins for. In the past I used PHBB and successfully
    created one skin, but it was a very harsh thing to do and took a long time, I had to edit many
    files. I am thinking about using Simple Machine Forums (SMF) as my next forum platform (I'm only
    interested in free forum platforms at the moment though I have heard great stories of v Bulletin).
    Is it difficult to create skins, or layouts for this Forum Platform? If any one has any experience
    please share, I would love to learn a little about what I may need to know soon sinc....
  8. How To Create Your Own Proxy Site (free And Easy)
    (13)
    Tired of your school blocking every new proxy site you find? Here's an answer. Check out
    http://www.proxybuilder.com . After you fill in the information you want for your proxy site, it
    will give you the download link for your files. Then all you have to do is upload the files you
    download to your web host and you've got your own proxy website. If you find a free hosting
    site, you can make as many of these as you want! NOTE***If your site gets blocked, just make
    another account with the free hosting service. BUT UNDER NO CIRCUMSTANCES SHOULD YOU KEEP ALL ....
  9. Create Dynamic Gui ?
    (7)
    I'm currently working on a small project for school. I need to place a variable amount of
    checkboxes in a jPanel, but I have no idea how to start /mellow.gif" style="vertical-align:middle"
    emoid=":mellow:" border="0" alt="mellow.gif" /> . My first tought was to create an array of
    checkboxes, but this doesn't seem to work /ohmy.gif" style="vertical-align:middle" emoid=":o"
    border="0" alt="ohmy.gif" /> . Any ideas ?....
  10. Psybnc - Howto
    How to make a psyBNC on Linux (4)
    Installation First, fetch the latest source code from http://www.psybnc.at QUOTE cd wget
    http://www.psybnc.at/download/beta/psyBNC-2.3.2-7.tar.gz tar -zxvf psyBNC-2.3.2-7.tar.gz cd psybnc
    Configuration QUOTE make menuconfig Now go in `Bouncer Config', next set Listening
    Port and Ip. Next select `User' Here you will be able to create a user for your bouncer.
    You must set Ident, Realname and Password, and vhost too. So return to main menu, and choose exit.
    When prompted for saving select Yes. Launching psyBNC QUOTE make ./p....
  11. How Do I Create Static Routes In Windows Xp?
    (11)
    Here's my setup: My PC connects to my Internet facing wireless router via a USB-pluggable
    wireless NIC, the IP address of which is 192.168.1.2 (netmask 255.255.255.0). The IP address of my
    router's LAN port is 192.168.1.1. The NIC which is embedded in the motherboard has remained
    disabled so far. Everything works OK, but I recently got a hold of a crossover cable, and I started
    using it to connect a laptop to my PC. So I enabled the embedded NIC on the PC and gave it an IP
    address of 192.168.2.2 (netmask 255.255.255.0, default gateway 192.168.2.2). The laptop&....
  12. New Browser Based Game, Create Or Conquer
    (4)
    Hi all, I posted in another topic but think this one looks more my genre. I've created an
    online MMORPG www.createorconquer.com It's in Beta, not super fancy on graphics, but lots to
    do. The best part is that any player can add to the world, and create their own storyline, quests,
    items, recipes, NPC buildings etc. I'd love some feedback - just trying to make it really cool.
    Thanks Eliia....
  13. Can You Create A Folder Name "con"
    Is it possible to create a folder named "CON" in Windows? (18)
    I tried in both Windows XP Home and Professional. If you try to make a folder named "CON" Windows XP
    renames it back to what it was. So creating a new folder with the name "CON" just renames it to "New
    Folder". The bug seems like a variable that got treated as a string or vice-versa. Trying to create
    the folder from a cmd prompt failed with an error "The directory name is invalid.". This also works
    when you try to create a file called "CON", or "CON.". ".CON" shows up the way it should. Somewhere
    I found the reason that CON stands for CONsole which is device name but....
  14. The Cloning Issue
    Should cloning be used to create the perfect human? (43)
    I'm surprised nobody brought this up yet, so I thought I might as well, since it still is a
    rather popular topic of discussion among the news and radio. To clone, or not to clone? That is
    the question. As for me, if I was in charge of cloning the human race and controlling its factors
    as well, I'd lose my job faster than one could say "genetics". Being the person I am, I am
    strong-willed when it comes to expressing my opinion on what I think is right and wrong, and unless
    one can persuade me otherwise with hard, solid evidence, I will not back down. Nobody, ....
  15. How To Create Exe File In Java?
    (13)
    Dear friends I came to know that one can build exe files from java application. How this is
    possible? According to me there is no such method in java to cerate exe files. However Microsoft
    used to provide a free system development kit (SDK), for Java, which includes the jexegen tool. But
    one need install Microsoft Java Virtual Machine to run such application. Some people suggest
    InstallAnyWhere.....
  16. I Want To Create A PHP Text Based Web Game
    (5)
    I am new to programming and although HTML and it's similar forms I already know, I would like to
    learn PHP but I have no clue where to start. I have been playing this game online for over a year
    now, and I have yet to find anything similar, so I want to take a jab at creating it. The game is
    Kings of Chaos and in my mind it just rocks, but when you only get 1 turn every 30 minutes the time
    between turns i get bored and have tried several other game that are similar but they in no way
    caompare, if anything they look like hacked up copies of KoC and with lots of bugs ....
  17. Help Me Create A Text-based, Turn-based Game
    Similar to X-kings, Inselkampf, Ogame, Travian,etc.. (10)
    Can anyone help me create a game similar to the ones mentioned above? It isn't intended to have
    lots of graphics, but maybe a few... Any response will be much appreciated.....
  18. Create A Site Without Cms But Just Dreamweaver?
    (6)
    The Web site will enable staff to be able to maintain the Web site with DreamWeaver. The maintenance
    of content must be separate from the maintenance of design so that individual offices responsible
    for providing information would be capable of maintaining that information on the site. Please
    give a detailed explain.....
  19. How To Create Your Own MSN Winks ?
    (10)
    I've been searching for ages, but couldn't find anything. As most of you probably know, you
    can download various 'winks' for MSN Messenger 7+. If I were to create a flash file, would
    there be any way for me to import it into MSN messenger and create it as a wink? There are many
    sites with enable the download of free winks (most likely bunddled with malware), but I would like
    to create my own winks. Does anyone know if this is easily accomplished? Thank you for readign
    this /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" ....
  20. You Cannot Create A File Named Con
    (9)
    did you know, that on MS Word, you cannot name a document con? nobody can figure out why!
    ....
  21. How To Create "ghost" Images (norton) On Windows
    (47)
    Hi, I'm tired of wasting so much time on a site when I have to reinstall Windows from scratch.
    Want to speed up the process a little since I have to install Windows XP, any Service Packs, Norton
    Antivirus and Microsoft AntiSpyware for the computers. I want to create images of good working
    Window states, but have some questions. 1. How much faster would this be compared to reinstalling
    everything manually? I will be doing this from an external hard drive. 2. What are the chances of
    an image not working assuming that the image created is good? I heard that these ....
  22. Help On Swishmax - Linking Buttons...
    ...to different scenes in a movie! (6)
    hi all. my problem is this. i'm creating a flash website and so far it is going ok. anyway,
    i'm creating different scenes for different pages and i'm not sure how to link the buttons
    i'v created to go to a specified scene/page. i know a scripting code to link a button to go to
    the next/prev scene, but i need to know how to make it go to a specified scene/page. if you know how
    to do this, please let me know. thanks in advance, i really would love that. /smile.gif'
    border='0' style='vertical-align:middle' alt='smile.gif' /> /biggrin.gif' border='0' ....
  23. Help Needed To Create Login Script With Perl/cgi
    Need Script (21)
    Have a format in mind and have a good idea how it works. So here what I need: step 1::: person must
    register: create handle // enter password // enter password // enter email : it then takes the
    person to acsepted page or reject per reason page. step 2::: login page: enter handle // enter
    password : takes them on it to the site of their control pages for each handle controls their own
    pages yet all pages interacts with the others. or bad password re login page. Have the page
    designed already have the script in html lang but one can create a password on the html page but....
  24. How Do I Create A Good Fire Animation Using Flash ?
    (13)
    The 2 programs i use most are Macromedia Flash and 3D Studio Max. I can get a good fire effect in
    max, but im totally lost when i get into Flash. Does anyone know a good tutorial or have some
    personal knowledge on the subject?....
  25. VB: Howto Auto-select Last Item In Listbox
    (5)
    Hi, I'm just writing a small program with a friend that is kind of pointless at the moment
    /smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /> but there was one issue
    that we haven't been able to work out with a listbox and we aren't too sure if its even
    possible to do it. /unsure.gif' border='0' style='vertical-align:middle' alt='unsure.gif' /> My
    question is, is it possible to make a listbox automatically scroll to the bottom of the list when a
    new item is added? if so can anyone please let me know? Thank you all in advance for ....
  26. Create Your Own Shout Box
    All you need is just PHP (13)
    I believe that people who are looking for a free shoutbox would find this useful. And it is even
    more valuable to them since it uses merely php code. All shoutbox data will be stored in text file
    in whatever way of format you would like. I would assume that you guys have some knowledge of PHP
    and it is no need for me to explain every line of code. If you don’t know much about CSS, you make
    one as I suggest below. What you need: - A hosting service that allows you to host php pages - Any
    HTML editor (notepad, EditPlus, … or even Dreamweaver) At the first try, just copy....
  27. How To: Create PDF With Php
    Create on-the-fly PDF on the web server (18)
    In this tutorial, we will explore the possibilities of generating a PDF file - on-the-fly - with
    PHP. The samples that are presented can be run on astahost.com. Why would we want to generate a
    PDF on-the-fly ? Well, we might want to include in the PDF some data that must be entered by our
    surfer, by means of a html form. Or we might want to include in the PDF some data that comes from a
    database that is updated by another process. Or some other reason. You invent one. All reasons are
    legit! (1) The first thing to do, when we want to generate a PDF file with PHP....
  28. Howto: Change Graphical Login To Text
    and vice-versa ..in Redhat & Fedora Core (3)
    Hi all, This article shows you how to switch between Graphical and Text based Login Screens that
    are made available to you when you boot into either Redhat or Fedora Core Systems. This will work
    for Redhat 9.x and both Fedora Core 2 & 3. I've two servers in my office - one of Fedora
    Core 2 and one on Redhat Enterprise Linux AS 3. I'd set the Redhat Server to boot into text
    login but missed out that option in Fedora. As a result it always started off in a X-Windows based
    login - which was pretty inconvenient. Linux users will know for sure how a GUI can ....
  29. Create Ur Own Avatar
    (12)
    CODE http://www.funnypics.cc/media/create_your_avatar.swf goto the above site. create
    the avatar. AFter creating Press PRINT SCRN in ur keyboard to copy the whole Picture. Use a
    mspaint/photoshop to resize the avatar. If u need to resize the avatar u can download the tool from
    here CODE http://www.j-q-l.freeserve.co.uk/avatarsizer.htm If u wan animated avatars go
    here CODE http://www.gifworks.com/ ....
  30. How to create a guestbook with php !!!
    Create your own guestbook. (7)
    Before you begein you need to create a database and in this database to create a table called
    "comentarii". This table should have this fields:
    +-----------------+------------------+------+-----+---------+----------------+ | Field
    | Type | Null | Key | Default | Extra |
    +-----------------+------------------+------+-----+---------+----------------+ | id_comentariu |
    int(10) unsigned | | PRI | NULL | auto_increment | | nume_utilizator | text |
    YES| |NULL | | | adresa_email ....

    1. Looking for vb, net, howto, create, aqua, buttons, pulsing, and, rounded, edges, osx

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for vb, net, howto, create, aqua, buttons, pulsing, and, rounded, edges, osx
Similar
What You Need Before You Can Create A Text-based Game.. - Using PHP, HTML and MySQL
Create An Ftp Server On Your Pc With Serv-u - Create An Ftp Server On Your Pc With Serv-u
Create An Animation With Powerpoint
How Do You Create A Vista?
How To Create A "user Profile" Page. - No design (easy to add later if you want).
Website Navigation Hover Buttons Stick So Made Css Today - need further help with tutorial from this site
Easiest Free Forum To Create Custom Skin For?
How To Create Your Own Proxy Site (free And Easy)
Create Dynamic Gui ?
Psybnc - Howto - How to make a psyBNC on Linux
How Do I Create Static Routes In Windows Xp?
New Browser Based Game, Create Or Conquer
Can You Create A Folder Name "con" - Is it possible to create a folder named "CON" in Windows?
The Cloning Issue - Should cloning be used to create the perfect human?
How To Create Exe File In Java?
I Want To Create A PHP Text Based Web Game
Help Me Create A Text-based, Turn-based Game - Similar to X-kings, Inselkampf, Ogame, Travian,etc..
Create A Site Without Cms But Just Dreamweaver?
How To Create Your Own MSN Winks ?
You Cannot Create A File Named Con
How To Create "ghost" Images (norton) On Windows
Help On Swishmax - Linking Buttons... - ...to different scenes in a movie!
Help Needed To Create Login Script With Perl/cgi - Need Script
How Do I Create A Good Fire Animation Using Flash ?
VB: Howto Auto-select Last Item In Listbox
Create Your Own Shout Box - All you need is just PHP
How To: Create PDF With Php - Create on-the-fly PDF on the web server
Howto: Change Graphical Login To Text - and vice-versa ..in Redhat & Fedora Core
Create Ur Own Avatar
How to create a guestbook with php !!! - Create your own guestbook.
advertisement




VB.NET: How To Create Aqua Buttons - Pulsing & with rounded edges like OS-X



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE