Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Skin Framework
  New Posts New Posts RSS Feed - [SOLVED] Losing Skin after Modal
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[SOLVED] Losing Skin after Modal

 Post Reply Post Reply
Author
Message
Biox View Drop Down
Groupie
Groupie


Joined: 14 September 2009
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote Biox Quote  Post ReplyReply Direct Link To This Post Topic: [SOLVED] Losing Skin after Modal
    Posted: 07 September 2010 at 8:24am
Appreciate if you could assist with this as I cannot seem to find a solution.

    SkinFramework.LoadSkin App.Path + "\styles\Office2007.cjstyles", ""
    SkinFramework.ApplyWindow Me.hWnd

I use the above starting the VB app.

Then I display a Form

            frmExportEmergencyInfo.Show vbModal

and that is skinned Ok.

However, when I close that, the main app loses it's skinning and just displays a normal looking VB form.

I'm stumped and I cannot find any CodeJock code examples which I feel is odd. There doesn't seem to be much by way of real world examples for SkinFramework.

thanks

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 09 September 2010 at 1:03am
Hi

You only need one instance of Skinframework for whole application. Don't put additional control to Dialog - it should be on main application window only.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Biox View Drop Down
Groupie
Groupie


Joined: 14 September 2009
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote Biox Quote  Post ReplyReply Direct Link To This Post Posted: 09 September 2010 at 1:19am
Thanks for the reply Oleg,

However when I do so, and then close the Modal that I have opened, I lose the skinning on the original MDIForm.

Back to Top
Xander75 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 April 2007
Status: Offline
Points: 353
Post Options Post Options   Thanks (0) Thanks(0)   Quote Xander75 Quote  Post ReplyReply Direct Link To This Post Posted: 21 September 2010 at 4:54am
As Oleg ssuggests you only need one SkinFramework control in your project, you need to use ".ApplyOptions" to set this to skin any form that opens from the main form.

Try using the following code in your main form:


    With SkinFramework
        .ExcludeModule "msado15.dll"
        .ExcludeModule "msdard.dll"
        .ExcludeModule "msjet40.dll"
        .ExcludeModule "msjetoledb40.dll"
        .ExcludeModule "msjiter40.dll"
        .ExcludeModule "msjint40.dll"
        .LoadSkin App.Path + "\Styles\Office2007.cjstyles", ""
        .ApplyWindow me.hWnd
        .ApplyOptions = SkinFramework.ApplyOptions Or xtpSkinApplyMetrics
    End With


PS. The reason for the ExcludeModule codes is that I have experienced crashes with the SkinFramework control when working with Databases under certain circumstances. This resolves the issues I have had, although I do only need .ExcludeModule "msado15.dll".
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)
Back to Top
Biox View Drop Down
Groupie
Groupie


Joined: 14 September 2009
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote Biox Quote  Post ReplyReply Direct Link To This Post Posted: 21 September 2010 at 7:45am
Thank you for the feedback Xander, appreciated.

That worked perfectly, and the screens are displaying faster now also. What I have been using is the following, in a couple of apps, with varying results and performance.

    SkinFramework.LoadSkin App.Path + "\styles\Office2007.cjstyles", ""
    SkinFramework.ApplyWindow Me.hWnd
    SkinFramework.ApplyOptions = SkinFramework.ApplyOptions Or xtpSkinApplyMetrics

One more question if you don't mind. I have a couple of modals that I display and I want to have a different colour Form so the modal can be readily seen in contract to the larger main form.

Would really appreciate if you could clue me in as to what lines of code I need to add to the Modal Form to just have that altered, and do I then need to reload the original style for the main form again when I go back to it ?  For example lets say I just want the modal popup screen to be App.Path + "\Styles\Office2007.cjstyles", "NORMALAQUA.INI"

I've tried fiddling here but cannot get it working.

thanks in advance


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.