I have been googling all day today and I've been trying to find some small, i know it won't be small, amount of code that will allow me to skin my VB.NET project. I don't want to do much to it as far as skinning. If you google GeekSquad MRI, you will find images that show the title bar with a skinned look along with the border around the form. I would like to do something like that.

Any help would be appreciated.

Recommended Answers

All 7 Replies

This may not be what you are after but I use controls from Component Factory (http://www.componentfactory.com/) and DevXpress (http://www.devexpress.com/) to skin my application. They have done the work for me and best of all the price is right.

Both offer free versions of their controls.

If you really want to roll your own I guess you could look at the code for their components that handle this to see how they did it.

HTH

That's exactly what I was looking for but I was hoping to find something that could be done on quite a bit of a smaller budget. I'm playing around with programming again to expand my knowledge a little more for future employment and don't quite have the budget to afford those.

Thanks for the suggestions though.

Look again because both of those companies hand out a lot of their controls for free, that's why I use them ;-)

Okay, so I looked at Component Factory a little more and found their free tools. How do I use the form skinning in it. I see the example app but I don't get how it works.

Here is what I do:
1) Reference the Krypton Component dll into your program
2) At the top of Visual Studio click on the "Project" menu then "Show All Files". This will display a + by the form and will allow access to the designer.
3) For each Form open the designer and at the top replace "Inherits System.Windows.Forms.Form" with
"Inherits ComponentFactory.Krypton.Toolkit.KryptonForm"

4) On one form (probably your main form) drop in the KryptonManager control. This is a non-visible component. You should see it appear in the components panel in the area below the form.
Click on the KryptonManager component to display the properties. One of the properties is "GlobalPaletteMode" this property contains the different skins that are available. Play around and see which one you like.

Keep in mind the component will change every form that inherits from ComponentFactory.Krypton.Toolkit.KryptonForm and also all Krypton controls you have on the form, NOT the standard Visual Studio controls. Also if you have multiple KryptonManagers that updating one Manager may not change all of your forms. I use only one manager so when I change it in one form all of the other forms will update too.

HTH

Let me know how you get on.

@sling blade - I got it all working now. The only thing is, when I compile the app and copy the exe to my flash drive, I get an error when I try to run it on another computer. When I debugged it, it told me that it could not load the file or assembly for ComponentFactory.Krypton.Toolkit. What do I need to do to fix this?

You need to include the Component.Krypton dll in the same location as your exe as it is now a dependent.

The best thing is to create an install .msi file that will install the program and any dependencies automatically.

You can use the "Setup and Deployment" type project to create the msi file for you.

Firstly, if you just want a quick easy answer just place the Krypton dll where-ever your exe is located.

Long term, knowing how to create a Setup and Deployment project is a must.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.