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.

Dani AI

Generated

Quick clarification and practical follow‑ups for the assembly load error that reported (and to expand on 's installer suggestion).

A runtime "could not load file or assembly" means the CLR could not find a required managed DLL at load time. Common, reliable fixes and checks:

  • Copy the complete build output folder (bin\Release or bin\Debug) to the target machine so the EXE, all referenced *.dll files and the app config travel together — this proves whether missing files are the cause.
  • In Visual Studio, make sure the Krypton (and any third‑party) references have their Copy Local property set to True so the DLLs are placed in the output automatically.
  • Confirm the target PC has the same .NET Framework that the project targets (Project Properties → Target Framework). Missing or wrong framework versions also cause load failures.
  • If the error persists, capture the assembly bind failure with the Assembly Binding Log Viewer (fuslogvw.exe); the log shows the exact assembly name, version and the paths the runtime searched.
  • For repeatable distribution, build an installer that includes the application primary output plus all dependency DLLs and runtime prerequisites (installer solutions such as ClickOnce, WiX, Inno Setup or Visual Studio installer projects will handle this).

Notes and cautions: inspect the References tree for any additional dependent assemblies or satellite resources and include them. Installing shared components into the GAC is an option but usually unnecessary for desktop apps — shipping the DLLs with the app folder is simplest. Finally, confirm redistribution rights for any third‑party control before bundling its runtime files.

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.