Helpful Information
 
 
Category: Visual Basic Programming
How can I change text in Shell window Title bar?

I use Shell to run some console apps. (VB6)

By default the title bar displays path\app.exe

I would like to change that to something friendlier.

TIA for your help.

Heinz

If you have the window handle of the process, you should be able to change the title of the window using the SetWindowText api. I've never done it, so I don't have any example code. Take a look at this and see if it helps:

http://www.mvps.org/vbnet/index.html?code/system/shellhwnd.htm

Thanks very much.

Looks like it should do the trick.

Heinz

My jump for joy was premature :-(

While I got it to work as per the example with notepad.exe, it doesn't when calling our console app, wordpad.exe or cmd.exe. Opens the progs ok, but no title bar change. That only works with notepad.exe.

Back to the drawing board and still looking for suggestions :-))

TIA - Heinz

You might try going to www.freevbcode.com and searching for "shell" to see if anyone there has posted a good routine:

http://www.freevbcode.com/ShowCode.Asp?ID=1308

http://www.freevbcode.com/ShowCode.Asp?ID=1282










privacy (GDPR)