|
-
Feb 9th, 2003, 02:37 PM
#1
Thread Starter
New Member
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
-
Feb 9th, 2003, 03:15 PM
#2
Hyperactive Member
VB Code:
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
-
Feb 9th, 2003, 03:23 PM
#3
Thread Starter
New Member
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
-
Feb 9th, 2003, 03:50 PM
#4
Thread Starter
New Member
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
-
Feb 9th, 2003, 03:50 PM
#5
Hyperactive Member
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
-
Feb 9th, 2003, 05:29 PM
#6
Thread Starter
New Member
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
-
Feb 9th, 2003, 06:42 PM
#7
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!!
-
Feb 9th, 2003, 08:11 PM
#8
Thread Starter
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|