Greenandroid
asked on
Rename Window : Easy Question
I know there is an easy solution to this, but again, lost it when i reformatted my comp. (i can't figure out how i did it before).
I have been using this bit of code below to find if a window is open with a certain name :
var
h: HWND;
begin
h := FindWindow(nil,'Untitled - Notepad'); //find window
if IsWindow(h) then begin
.......
end;
I need to know how to RENAME the window name if that particular window name exists... For my example above, if a window with the name 'Untitled - Notepad' is found, it will rename it to 'My Sentence' for example.
I have been using this bit of code below to find if a window is open with a certain name :
var
h: HWND;
begin
h := FindWindow(nil,'Untitled - Notepad'); //find window
if IsWindow(h) then begin
.......
end;
I need to know how to RENAME the window name if that particular window name exists... For my example above, if a window with the name 'Untitled - Notepad' is found, it will rename it to 'My Sentence' for example.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
ok you must have submitted your solution whilst i was typing mine.. what a strange case of timing...
But saves me having to get the post closed...
You may have the points!
But saves me having to get the post closed...
You may have the points!
ASKER
If anyone else is interested, its
var
h: HWND;
begin
h := FindWindow(nil,'Untitled - Notepad'); //find window
if IsWindow(h) then begin
SetWindowText(h,PAnsiChar(
end;
end;
CAN I REQUEST THAT THIS TOPIC IS CLOSED