How can i get the Back color of a control that is in an external app.
I have the hwnd of that control.
Thanks.
Printable View
How can i get the Back color of a control that is in an external app.
I have the hwnd of that control.
Thanks.
try these
Code:Private Declare Function GetDC Lib "user32" Alias "GetDC" (ByVal hwnd As Long) As Long
Private Declare Function GetBkColor Lib "gdi32" Alias "GetBkColor" (ByVal hdc As Long) As Long
Private Function getcol(hWnd As Long) As Long
getcol = GetBkColor( GetDC(hWnd))
End Function
It works for some controls like picturebox and forms but it doesn't work for others like textbox buttons etc.