Skip to content

ApplyWindow Method

Description

Tell the SkinFramework which window's appearance will be skinned.

Syntax

Public Sub ApplyWindow( _
    ByVal hWnd As Integer _
)

Parameters

  • hWnd: Handle of the window to be skinned.

Remarks

ApplyWindow tells the SkinFramework which window's appearance to skin. This can be called before or after a skin has been loaded, but the skin will not be applied until ApplyWindow is called. Skins are loaded using the LoadSkin method.

Each child window opened will also have its appearance skinned by the currently applied skin. If this behavior is not desired, then call the LoadSkin method using a blank string as both parameters; this will set the default system theme.

Example

Applying a skin to a window (Visual Basic)

This sample illustrates how to apply a skin to a window.

Private Sub Form_Load()  
    ' Loads the NormalOffice2007.ini skin  
    SkinFramework.LoadSkin App.Path + "..\..\..\Styles\Office2007.cjstyles", "NormalOffice2007.ini"  

    ' Loads currently set system skin  
    ' SkinFramework.LoadSkin "", ""  

    ' Applies the currently loaded skin to the specified window  
    SkinFramework.ApplyWindow Me.hWnd  
End Sub  

See Also


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.