Skip to content

CreateSchema Method

Description

Creates a SkinSchema resource to be used by the SetWindowTheme method for setting the theme/skin of individual objects (buttons, frame, checkbox, etc.).

Syntax

Public Function CreateSchema( _
    ByVal ResourcePath As String, _
    ByVal IniFileName As String _
) As SkinSchema

Parameters

  • ResourcePath: Path to a .cjstyles or .msstyles skin file. This is the file that contains one or more .ini files.
  • IniFileName: Name of the .ini file of skin to apply. If no .ini file name is supplied, the first .ini file found will be used.

Return Type

Returns a SkinSchema resource from the specified ResourcePath and IniFileName to be used by the SetWindowTheme method for setting the theme/skin of individual objects (buttons, frame, checkbox, etc.).

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.