Whooh ****, just realized that was a bit too much code for such a simple task , didn't mean to scare ya mate
here are the API calls you need, just check in the Class how I did it.
Ok that's easier to reead huhCode:Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long Private Declare Function EnableWindow Lib "user32" (ByVal hwnd As Long, ByVal fEnable As Long) As Long Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Private Const WM_SETTEXT = &HC Private Const WM_GETTEXT = &HD Private Const WM_GETTEXTLENGTH = &HE Public Property Let Caption(WinhWnd As Long, Caption As String) SendMessage WinhWnd, WM_SETTEXT, ByVal CLng(0), ByVal Caption End Property Public Property Get Caption(WinhWnd As Long) As String Dim l%, Wintext$, retval& l = SendMessage(WinhWnd, WM_GETTEXTLENGTH, ByVal CLng(0), ByVal CLng(0)) + 1 Wintext = Space(l) retval = SendMessage(WinhWnd, WM_GETTEXT, ByVal l, ByVal Wintext) Wintext = Left(Wintext, retval) Caption = Wintext End Property Public Property Let Enabled(WinhWnd As Long, Enable As Boolean) EnableWindow WinhWnd, -Enable End Property Public Property Get Enabled(WinhWnd As Long) As Boolean Enabled = -(IsWindowEnabled(WinhWnd)) End Property
If you need help just let me know ok?




Whooh ****, just realized that was a bit too much code for such a simple task , didn't mean to scare ya mate 
Reply With Quote