Welcome Guest Search | Active Topics | Members | Log In | Register

VisualStyler styles parent form with plugin Options
wjstarck
Posted: Thursday, July 22, 2010 12:38:54 AM
Rank: Newbie
Groups: Member

Joined: 7/22/2010
Posts: 6
Points: -129
Hello-

I would like to skin my plugin's forms with VisualStyler. However, in addition to skinning all the forms in my plugin, VisualStyler skins the parent form of the host application, which is not what I want ( I want my plugin forms to stand out from the forms of the underlying application). How do I rectify this (VS 2008, .NET 3.5.1)?

Thank you,

Will
SkinSoft Support
Posted: Thursday, July 22, 2010 4:56:29 PM

Rank: Administration
Groups: Administration

Joined: 2/19/2008
Posts: 158
Points: -1,473
Location: UK
Hi,

The default skin mode is to skin virtually everything on the current UI thread, this is fine if your
application is pure WinForms, if the host application isn't a windows forms application i.e such as
an Office Add-In ( Word,Excel etc), then there are two methods you can use in this scenario :-

Method 1.
[1] At design-time click on the VisualStyler component and set SkinMode to Manual
[2] In the Load event of each Form manually apply the skin as in the following sample code

Code:

private void Form_Load(object sender, EventArgs e)
{
        SkinSoft.VisualStyler.VisualStyler.ApplySkin(this);
}


Method 2.
[1] At design-time click on the VisualStyler component and set SkinMode to Automatic
[2] At design-time click on the VisualStyler component and set all of the following properties to False

SkinSystemControls = False
HookSystemColors = False
HookSystemDrawing = False
HookVisualStylers = False

You might get a way using this method since the hook settings affect the entire application and are now
disabled and also VisualStyler will not attempt to skin any non-WinForms controls.

wjstarck
Posted: Thursday, July 22, 2010 5:44:59 PM
Rank: Newbie
Groups: Member

Joined: 7/22/2010
Posts: 6
Points: -129
Nice!

#1 worked just fine.

Thank you.
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.6 (NET v2.0) - 11/14/2007
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.
This page was generated in 0.039 seconds.