Print Page | Close Window

[SOLVED] Losing Skin after Modal

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Skin Framework
Forum Description: Topics Related to Codejock Skin Framework
URL: http://forum.codejock.com/forum_posts.asp?TID=17216
Printed Date: 02 May 2024 at 6:33pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [SOLVED] Losing Skin after Modal
Posted By: Biox
Subject: [SOLVED] Losing Skin after Modal
Date 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




Replies:
Posted By: Oleg
Date 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


Posted By: Biox
Date 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.



Posted By: Xander75
Date 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)


Posted By: Biox
Date 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





Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net