Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rename a Window API Program Header

Status
Not open for further replies.

kennedymr2

Programmer
May 23, 2001
594
AU
I have a program which looks for a particular program which is running say prog1.exe.
This program is in VB, But i did not write it. Unable to alter anything.

----
win_buff3 = FindWindow("ThunderRT6FormDC", "Prog1") ' First Attempt To Find Main Window
If win_buff3 = 0 Then win_buff3 = FindWindow("ThunderRT6FormDC", vbNullString) ' Seccond Attempt To Find Main Window
----

This has been going great, until now!!!
------
%##$%%$$%
I need to have two copies of the program "prog1",running.

The above program will only find the first instance of Prog1
(ie the header)

Is it possible to RENAME ,the header,of the first instance of the program running from Prog1 to say Progx

Or, can i skip over the first instance of prog1, and look for the second. (?? How do i do this with the above code)

Appreciate any help


 
I am referring more technically to...
the "application title bar"
When i refer to header.., above
 
I have worked the problem out using api call....

handle=1504
newtit="prog2"

SetWindowText(handle, newtit)


regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top