Attribute VB_Name = "hlp_XPSkinSupportHelper"
' Copyright (C) 2004-2006 Jan Vorel
' This program is free software; you can redistribute it and/or modify
' it under the terms of the GNU General Public License as published by
' the Free Software Foundation; either version 2 of the License, or
' (at your option) any later version.

' This program is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
' GNU General Public License for more details.

' You should have received a copy of the GNU General Public License
' along with this program; if not, write to the Free Software
' Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA




' If you have any questions, suggestions or bug reports about this product,
' contact me: info@ctuser.net; Do not contact me about general B.A.S.I.C.
' language or A.P.I. issues


' Normally, for skinsupport just add the InitCommonControls() declaration and
' call it on Form_Initialation or Sub_Main.
' However, if your program causes an error (on Windows XP only) when quitting,
' add this module instead and Call XPSkinSupportHelper() on Form_Initialation
' or in your Sub_Main


Option Explicit
Option Base 0

Private Declare Function LoadLibraryA Lib "kernel32" (ByVal lpLibFileName As String) As Long
Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long
Private Declare Sub InitCommonControls Lib "comctl32.dll" ()

Public Sub XPSkinSupportHelper()
  Dim xLong1 As Long
  
  xLong1 = LoadLibraryA("shell32.dll")
  Call InitCommonControls
  Call FreeLibrary(xLong1)
  End Sub

