Results 1 to 8 of 8

Thread: How can I change Title Bar text

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2003
    Posts
    5

    How can I change Title Bar text

    I'm exploring using the Process component to launch some console apps. It's working great but I'd like to change the text in the Titlebar to something other than the path/filename that is used by default.

    I've seen references and examples to read the text but not to set it and as I'm relatively new to VB.NET (and other VB's for that matter) I've not been able to 'experiment'.

    Thanks in advance for any suggestions/help/pointers you may be able to provide an 'old' programmer that is trying get current :-))

    Heinz

  2. #2
    Hyperactive Member phrozeman's Avatar
    Join Date
    Apr 2000
    Location
    Netherlands
    Posts
    442
    VB Code:
    1. Form1.ActiveForm.Text = "New caption"

    Thats how i do it
    There's a certain mystique when I speak, that you notice that it's sorta unique, cause you know it's me

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2003
    Posts
    5
    Not quite that easy, as no form is involved. Sorry for not being clear.

    The Process component launches an app in it's own window/shell, which displays the launched progs path/name in the titlebar. That's what I'm trying to change.

    Heinz

  4. #4

    Thread Starter
    New Member
    Join Date
    Feb 2003
    Posts
    5
    Not quite that easy, as no form is involved. Sorry for not being clear.

    The Process component launches an app in it's own window/shell, which displays the launched progs path/name in the titlebar. That's what I'm trying to change.

    Heinz

  5. #5
    Hyperactive Member phrozeman's Avatar
    Join Date
    Apr 2000
    Location
    Netherlands
    Posts
    442
    Can u post your code here?
    Becoz i never worked with the Process component
    There's a certain mystique when I speak, that you notice that it's sorta unique, cause you know it's me

  6. #6

    Thread Starter
    New Member
    Join Date
    Feb 2003
    Posts
    5
    Not much code.
    I've just been using the samples in MS Visual Basic .Net Step by Step and using VB in VS.net.

    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    Me.noteProcess = New System.Diagnostics.Process()

    'noteProcess
    '
    Me.noteProcess.StartInfo.Arguments = "-r"
    Me.noteProcess.StartInfo.FileName = "filename.lnk"
    Me.noteProcess.StartInfo.WorkingDirectory = "c:\"
    Me.noteProcess.SynchronizingObject = Me

    During more experimenation I found that VB7 can launch a link as per above and in the link I can use the filename I want in the title. Kinda' a backward way of achieving what I want, but achieve nevertheless. (VB6 didn't work with .lnk files).

    Heinz

  7. #7
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    if you're ok with using APIs, there is a handy console library here:
    http://www.c-sharpcorner.com/Code/20...SysConsole.asp

    that would set the title if I remember correctly
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  8. #8

    Thread Starter
    New Member
    Join Date
    Feb 2003
    Posts
    5
    Thanks MrPolite.

    This'll be great for console apps we do from scratch. Unfortunately some of the ones are already done and cannot be recompiled. What I'm doing is using a VB gui app to act as front end to a bunch of legacy console apps and I'm trying to 'dress them up a little' :-))

    Heinz

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width