Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Skin Framework
  New Posts New Posts RSS Feed - Multi-form skin problems
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Multi-form skin problems

 Post Reply Post Reply
Author
Message
Rolland View Drop Down
Newbie
Newbie


Joined: 19 May 2011
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rolland Quote  Post ReplyReply Direct Link To This Post Topic: Multi-form skin problems
    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.
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: 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
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 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)
Back to Top
Rolland View Drop Down
Newbie
Newbie


Joined: 19 May 2011
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rolland Quote  Post ReplyReply Direct Link To This Post Posted: 22 May 2011 at 8:37pm
thx all
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.141 seconds.