Results 1 to 10 of 10
  1. #1
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead

    [Tutorial] Fully Themed Windows Vista Controls In Your Apps

    Hi !

    In this tutorial I'll show you how to add Windows Vista controls to your applications. Although, there are many wrappers available on the internet. The best in my opinion is of Nicholas Kwan from Code Project.

    Tools you will need to complete the tutorial:

    ■ Windows Vista or Later.
    ■ At-least .NET framework 2.0
    ■ Visual Studio 2005 or Later.

    This tutorial applies to all .Net languages including:

    ■ Visual Basic.NET
    ■ C-Sharp
    ■ C++

    The wrapper from Nicholas Kwan includes the following controls:

    1: Command Link
    2: Tree View
    3: Progress Bar
    4: Split Button
    5: List View
    6: Image Button

    So, let's start:

    ■ Create a new project in any language of the .NET
    ■ After the project is created, go to Toolbox and click choose items and then choose the included DLL in this tutorial.





    These controls will be added:



    Now let's take a look at the control individually:

    Command Link:
    Command Links are really just buttons, assigned with a different theme.

    Here's what it looks like:


    Usage:
    Drag the Command Link to the Form / User Control. Change its Text to anything you want like "Launch Gaming Section". Then re-size it so it wraps the text. Rest of the properties are same, like Enable / Disable etc...

    Tree View and List View:
    By default, Tree Views and List Views do not have the same look as that of Explorer:


    This wrapper solves this issue and gives some cool look to the controls:









    Usage:

    Same as default Tree view and List view controls of .NET . So I guess, no need to explain. But if you feel any difficulty, feel free to ask me via VM.

    Progress Bar:
    In Windows Vista, progress bars come in different flavors, the most common progress bar being the green one. However, there are also the red and yellow versions as well (there is a blue version, known as a meter, but that is inaccessible). The progress bar colors seem to correspond to specific progress bar states. We can set those states programatically.



    Usage:

    Drag 3 progress bars to the form as shown above.

    Now use the following commands to set the states. You can call it from where ever you want:

    Normal State:
    [PHP]VistaControls.VistaConstants.SendMessage(pb.Handle ,VistaControls.VistaConstants.PBMSETSTATE,VistaCon trols.VistaConstants.PBSTNORMAL,0)[/PHP]

    Paused State:
    [PHP]VistaControls.VistaConstants.SendMessage(pb2.Handl e,VistaControls.VistaConstants.PBMSETSTATE,VistaCo ntrols.VistaConstants.PBSTPAUSED,0)[/PHP]

    Error State:
    [PHP]VistaControls.VistaConstants.SendMessage(pb3.Handl e,VistaControls.VistaConstants.PBMSETSTATE,VistaCo ntrols.VistaConstants.PBSTERROR,0)[/PHP]

    In the above codes, pb, pb2 and pb3 are the names of the progress bars respectively.

    Image Button:
    Same as default button, but adds clean effect to the button when image is added. Also supports *.ico extension now.

    Split Button:
    Just like Command Links, Split Buttons are just simply buttons. However, even after setting the style, how are you going to associate a menu (context menu) to the button? We can do this by first associating an event which would be fired whenever a person clicks on the "drop down" on the split button. To do this follow the instructions below:

    Add a split button to the form. Now go to the load event of the form and add the following code:

    Dim Menu As New ContextMenu
    Menu.MenuItems.Add( "General")
    Menu.MenuItems.Add( "Entertainment")
    Menu.MenuItems.Add( "-")
    Menu.MenuItems.Add( "Visual Basic")
    Menu.MenuItems.Add( "C# / C++")
    SplitButton1.Dropdownmenu = Menu

    Change the SplitButton1 with the name of your split button. Change the items of the Context Menu as required.

    Here's a screen shot:



    Here's a screen shot of the controls we just discussed:



    Hmm...I am still not finished. I am gonna show you another cool control which is a part of the windows vista and 7. It is a Task Dialog and you must be familiar with it:



    This control has been written by Daniel Moth. I've attached the wrapper DLL of the Task Dialog and is named "TaskDialogWrapper.dll".

    To use the Task Dialog, add the reference to the "TaskDialogWrapper" DLL. Now simply use the following line of code to show the Task Dialog:

    TaskDialogWrapper.TaskDialog.Show( Me , "Virus Detected !", "Immediate Virus Scan Needed.", "Please do a virus scan as soon as possible or it will own you xD. To download the antivirus software goto: https://www.microsof*****m",TaskDialogWrapper.TaskDialogButtons.Close,TaskDia logWrapper.TaskDialogIcon.Shield)


    Also, I am working on a custom control. It's also a part of Vista and 7. It is the BreadCumb control:



    Hopefully, it will be completed in a day or two.

    So, that's all for now. I'll add more controls as I'll browse through them.

    If you are tired of the most advanced GUI's ever (The releaser that says on his every release), then step forward and start using these controls. They'll make your applications sleek and sweet. Make MPGH a bit more modern. All controls are highly customizable. Just play around with them a bit and you'll master them.

    Here's Virus Scan:
    Wrapper DLLs.zip MD5:d3788fccee9c04225c480877fb752359 - VirSCAN.org Scanners did not find malware!

    If you need help with any control, just VM me and I'll help you out.

    I hope this helps !!

    Press Thanks if helped !!

    Greetz,
    FlameSaber

  2. The Following 9 Users Say Thank You to Hassan For This Useful Post:

    **Seals** (08-16-2011),.Celtics (07-24-2010),/b/oss (06-05-2010),ConradoPSA (02-11-2016),darjeeling (08-07-2013),Invidus (06-05-2010),mnpeepno2 (06-06-2010),ppl2pass (06-06-2010),Zoom (06-05-2010)

  3. #2
    Invidus's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    2,167
    Reputation
    23
    Thanks
    650
    My Mood
    Bored
    Great job FLAMESABER!! Very detailed.
    Thanks for posting this here.

  4. #3
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,970
    My Mood
    Happy
    Good job !
    -Rest in peace leechers-

    Your PM box is 100% full.

  5. #4
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    Thanks guys

  6. #5
    Samueldo's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Meh
    Posts
    1,023
    Reputation
    29
    Thanks
    348
    My Mood
    Inspired
    OMFG AMAZING

    I'm definitely going to try and use these in Infinity 2.0
    Quote Originally Posted by Grim View Post
    glad to be an inspiration
    Minions rule. /endof

    InjectPlz Refresh - download v1.0 now!

  7. #6
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Thanks for sharing.



  8. #7
    /b/oss's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    13,651
    Reputation
    795
    Thanks
    3,547
    w00t awesome! ty this will raise my GUI lvl

  9. #8
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    THHHHHHHHHHHHHHAAAAAAAAAANNNNNNNNNNKKKKKKKKKKK YOOOOOOOOOOOOOOOOOOOOOOOUUUUUUUUUUU!!!!!!!!!!!!!!! !!!!!!!


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  10. #9
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    Approved attachment.

    VERY Helpful.

  11. #10
    MvRouC12's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Stalking Choobs
    Posts
    1,690
    Reputation
    13
    Thanks
    246
    My Mood
    Amused
    Dude, Flame you rock. Thats a nice tutorial

    [IMG]https://i986.photobucke*****m/albums/ae345/TripleSixPf/Okami-MvRouC12.jpg[/IMG]
    Quote Originally Posted by m_t_h View Post


    By stop playing AVA untill brasilian server comes.

    Do you guys really need to ruin EVERY game?
    [IMG]https://i175.photobucke*****m/albums/w148/Guitarman1157/dontforget.gif[/IMG]

Similar Threads

  1. [Tutorial] Fully Themed Windows Vista Controls In Your Apps
    By Hassan in forum Visual Basic Programming
    Replies: 7
    Last Post: 06-07-2010, 08:36 PM
  2. Replies: 9
    Last Post: 05-23-2010, 10:23 PM
  3. [Tutorial] Windows Vista/7 Glass Window
    By MJLover in forum Visual Basic Programming
    Replies: 18
    Last Post: 04-17-2010, 11:15 AM
  4. Double or Triple your FPS ( Windows Vista )
    By Penchimp in forum CrossFire Hacks & Cheats
    Replies: 8
    Last Post: 07-10-2009, 04:39 AM
  5. [Tutorial]Disabaling emu windows in your runnable
    By HolyFate in forum Gunz General
    Replies: 14
    Last Post: 02-09-2006, 11:16 PM