Change Other Apps titlebar... how ?
IS it possible to change another applications titlebar ? say for example when you open MSN messenger it opens with "MSN Messenger" as the titlebar, how can i change this with my Application ?
I'm thinking get the window handle then use the SetWindowText API ?
Any help and code will be appreciated, thanks :)
Re: Change Other Apps titlebar... how ?
SetWindowText will work and so will SendMessage(lHwnd, WM_SETTEXT, ByVal "Test", 4) or something like that.
Re: Change Other Apps titlebar... how ?
VB Code:
Option Explicit
Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SendMessageString Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _
ByRef lParam As Any) As Long
Private Const WM_SETTEXT As Long = &HC
Private Sub Command1_Click()
Dim lHwnd As Long
lHwnd = FindWindow("MSNMSBLClass", "MSN Messenger")
SendMessageString lHwnd, WM_SETTEXT, ByVal 12, ByVal "My Messneger"
End Sub
Re: Change Other Apps titlebar... how ?
Ok, so how would i go aboput getting the handle on the Window to send the message too ?
(i don;t have Spy+)
Re: Change Other Apps titlebar... how ?
www.patorjk.com has a tool called API Spy :)