Hi,

I have been looking at various ways to skin my application nut am not having much success.

I have tried Skin Crafter, although what ever I try I cannot get this to work.

I am now trying USkin and am having some success but still need a little help from anybody that may have used it.

If I place this:-

//First Declare a skin object
    [STAThread]
	static void Main()
	{
        USkinSDK.USkinInit("", "", "..\\Skins\\DiyGreen.msstyles");
		Application.Run(new Form1());
	}

within the Main entry of my Program.cs, nothing happens i.e. no styling of the form.

If I place:-

USkinSDK.USkinInit("", "", "..\\Skins\\DiyGreen.msstyles");

on my Form1.cs between a Form_Load function, the styling does appear but it only shows the form's caption bar and none of the rest of the form.

Any help would be appreciated.

Regards..,

MT ;)

Hi,

I have been looking at various ways to skin my application nut am not having much success.

I have tried Skin Crafter, although what ever I try I cannot get this to work.

I am now trying USkin and am having some success but still need a little help from anybody that may have used it.

If I place this:-

//First Declare a skin object
    [STAThread]
	static void Main()
	{
        USkinSDK.USkinInit("", "", "..\\Skins\\DiyGreen.msstyles");
		Application.Run(new Form1());
	}

within the Main entry of my Program.cs, nothing happens i.e. no styling of the form.

If I place:-

USkinSDK.USkinInit("", "", "..\\Skins\\DiyGreen.msstyles");

on my Form1.cs between a Form_Load function, the styling does appear but it only shows the form's caption bar and none of the rest of the form.

Any help would be appreciated.

Regards..,

MT ;)

OK, after a bit of messing around I got the style to show correctly on the form using this:-

private void Form1_Load(object sender, EventArgs e)
        {
            Size presize = this.Size; // Get the correct form size before the GUI mucks it up.
            USkinSDK.USkinInit("", "", "VP.msstyles"); // Replace the text accordingly with your msstyles file.
            USkinSDK.USkinLoadSkin("VP.msstyles"); // And again here.
            this.Size = presize; // Re-establish the form size.
        }

My problem now is that if I open another form from this form, the new form has no styling at all, not even XP, just windows classic look. I know this sounds obvious because the actual style is only associated with form1 in the load function, however, I placed the same piece of code in form2's load function but nothing changes.

Where can I place to above code so all the forms within my project will be styled?

Kind regards..,

MT ;)

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.