#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2001
    Location
    Langley, BC Canada
    Posts
    35
    Rep Power
    14

    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

    Comments on this post

    • Gran Roguismo agrees
  2. #2
  3. Big Endian
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    May 2001
    Location
    Fly-over country
    Posts
    1,172
    Rep Power
    30
    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.../shellhwnd.htm
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2001
    Location
    Langley, BC Canada
    Posts
    35
    Rep Power
    14
    Thanks very much.

    Looks like it should do the trick.

    Heinz
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2001
    Location
    Langley, BC Canada
    Posts
    35
    Rep Power
    14
    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
  8. #5
  9. Big Endian
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    May 2001
    Location
    Fly-over country
    Posts
    1,172
    Rep Power
    30
    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

IMN logo majestic logo threadwatch logo seochat tools logo