SetWindowTheme Method
Description
Applies a SkinSchema skin resource object to an individual object. This allows objects on a single form to all use a different skin resource.
Syntax
Public Sub SetWindowTheme( _
ByVal hWnd As Integer, _
ByVal Schema As SkinSchema _
)
Parameters
- hWnd: Handle to the object to skin.
- Schema: SkinSchema resource that contains the skin to apply to the specified object.
Remarks
The SetWindowTheme method allows you to individually skin different objects within the same form with different skins. For example, you can have a form skin using the Office 2007 Black skin and have the buttons on that form use the Windows XP skin.
To do this, use CreateSchema to create a SkinSchema resource and then use SetWindowTheme to apply the skin resource to an object such as a button.
CreateSchema is used to create a SkinSchema resource so that the resource can be shared among other objects. Simply remember the reference to the resource created and apply it to each object that it is needed. You can use any number of different skins in an application.
See Also
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.