Const ICC_LISTVIEW_CLASSES = &H1 ' listview, header
Const ICC_TREEVIEW_CLASSES = &H2 ' treeview, tooltips
Const ICC_BAR_CLASSES = &H4 ' toolbar, statusbar, trackbar, tooltips
Const ICC_TAB_CLASSES = &H8 ' tab, tooltips
Const ICC_UPDOWN_CLASS = &H10 ' updown
Const ICC_PROGRESS_CLASS = &H20 ' progress
Const ICC_HOTKEY_CLASS = &H40 ' hotkey
Const ICC_ANIMATE_CLASS = &H80 ' animate
Const ICC_WIN95_CLASSES = &HFF
Const ICC_DATE_CLASSES = &H100 ' month picker, date picker, time picker, updown
Const ICC_USEREX_CLASSES = &H200 ' comboex
Const ICC_COOL_CLASSES = &H400 ' rebar (coolbar) control
Const ICC_INTERNET_CLASSES = &H800
Const ICC_PAGESCROLLER_CLASS = &H1000 ' page scroller
Const ICC_NATIVEFNTCTL_CLASS = &H2000 ' native font control
Private Type InitCommonControlsExType
dwSize As Long 'size of this structure
dwICC As Long 'flags indicating which classes to be initialized
End Type
Private Const WS_VISIBLE = &H10000000
Private Const WS_CHILD = &H40000000
Private Declare Sub InitCommonControls Lib "comctl32" ()
Private Declare Function InitCommonControlsEx Lib "comctl32" (init As InitCommonControlsExType) As Boolean
Private Declare Function CreateWindowEx Lib "user32" Alias "CreateWindowExA" (ByVal dwExStyle As Long, ByVal lpClassName As String, ByVal lpWindowName As String, ByVal dwStyle As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInstance As Long, lpParam As Any) As Long
Private Declare Function DestroyWindow Lib "user32" (ByVal hwnd As Long) As Long
Dim mWnd As Long
Private Sub Form_Load()
'KPD-Team 2000
'URL: [url]http://www.allapi.net/[/url]
Const IE3_INSTALLED = True
If IE3_INSTALLED = True Then
Dim initcc As InitCommonControlsExType
initcc.dwSize = Len(initcc)
initcc.dwICC = ICC_UPDOWN_CLASS
InitCommonControlsEx initcc
Else
InitCommonControls
End If
mWnd = CreateWindowEx(0, "msctls_updown32", "KPD UpDown Control", WS_VISIBLE Or WS_CHILD, 0, 0, 50, 100, Me.hwnd, ByVal 0&, ByVal 0&, ByVal 0&)
End Sub
Private Sub Form_Unload(Cancel As Integer)
DestroyWindow mWnd
End Sub