Print Page | Close Window

Multi-form skin problems

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=18407
Printed Date: 29 April 2024 at 11:44am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Multi-form skin problems
Posted By: Rolland
Subject: Multi-form skin problems
Date Posted: 19 May 2011 at 9:17am
I designed two forms,use v15.0.1

the first form code:
-------------------------------------------
Private Sub Form_Load()
    SkinFramework1.LoadSkin App.Path + "\Styles\Office2007.cjstyles", "NormalBlue.ini"
    SkinFramework1.ApplyWindow Me.hWnd
    SkinFramework1.ApplyOptions = SkinFramework1.ApplyOptions Or xtpSkinApplyMetrics
    lbVer.Caption = "Version:beta 1.0"
    'lbVer.ForeColor = vbWhite
End Sub


Private Sub PushButton2_Click()
    frm1.Show
    Me.Hide
End Sub
-----------------------------------------------------

the second form code
-----------------------------------------------------
Private Sub Form_Load()
    SkinFramework1.LoadSkin App.Path + "\Styles\Office2007.cjstyles", "NormalBlue.ini"
    SkinFramework1.ApplyWindow Me.hWnd
    SkinFramework1.ApplyOptions = SkinFramework1.ApplyOptions Or xtpSkinApplyMetrics
    lbVer.Caption = "version:beta 1.0"
    'lbVer.ForeColor = vbWhite
End Sub


Private Sub PushButton1_Click()
    frmSys.Show
    Me.Hide
End Sub


Private Sub Form_Unload(Cancel As Integer)
    Unload Me
    frmSys.Show
End Sub
-----------------------------------------------------

My question is: When showing a second form, click Close, it is back to the first form, but the skin did not load the first form,why?

I am very confused.



Replies:
Posted By: Oleg
Date Posted: 20 May 2011 at 6:31am
Hi,

Application should have only 1 instance of SkinFramework that will skin all forms. just remove it from second form - it will be skinned automatically.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Xander75
Date Posted: 21 May 2011 at 8:51am
Hi,

As Oleg says, you only need one instance of the SkinFramwork control in your application. Try using the following code in your first form that opens:

    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: Rolland
Date Posted: 22 May 2011 at 8:37pm
thx all



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