|
-
Apr 21st, 2004, 09:57 AM
#1
Thread Starter
Hyperactive Member
Keep form caption ...but change Taskbar caption...how?
I want to keep the Form caption as is...but kind of need that the button in the TaskBar shows the percentage of completion of a task... since it'll be sometimes working in the background
this is just like it happends in the application FlashFXP ...in the main it shows the app.caption and the FTP where I'm logged and in the TaskBar it shows the percentage of the file being retrieved and total time to finish...
I just need to find out the ...How to do it... been searching here in general and in the API section but all (that I've found) reffers to borderless or without titlebar forms ...
Thanks in advance for any lead provided!
"Who Dares Wins" - "Quien se Arriesga Gana"
Mail me at: 
-
Apr 21st, 2004, 10:02 AM
#2
Change the Caption based on the WindowState property.
VB Code:
If WindowState = vbMinmized then
Caption = "Percentage"
Else
Caption = "Normal view"
End If
-
Apr 21st, 2004, 10:15 AM
#3
Thread Starter
Hyperactive Member
thanks...
but that also changes the caption on the form...
and I need it to remain the same...
that's how it works in FlashFXP and that's exactly how I would desire to be
"Who Dares Wins" - "Quien se Arriesga Gana"
Mail me at: 
-
Apr 21st, 2004, 11:13 AM
#4
Re: Keep form caption ...but change Taskbar caption...how?
Originally posted by D12Bit
I want to keep the Form caption as is...but kind of need that the button in the TaskBar shows the percentage of completion of a task... since it'll be sometimes working in the background
this is just like it happends in the application FlashFXP ...in the main it shows the app.caption and the FTP where I'm logged and in the TaskBar it shows the percentage of the file being retrieved and total time to finish...
I just need to find out the ...How to do it... been searching here in general and in the API section but all (that I've found) reffers to borderless or without titlebar forms ...
Thanks in advance for any lead provided!
What do you mean by "in the background"? Can it be seen? If not then I don't understand what's wrong with brucevde's suggestion.
-
Apr 21st, 2004, 02:29 PM
#5
Thread Starter
Hyperactive Member
in the background as in: another form is on top of the one that I'm talking about...
and...
this solution could also be if the form has the focus or not...
but still will have the same issue ... in the title of the form I need certain information...like what ip is conected to ... and in the taskbar the progress information ... because I can have several instances of it ...(same as FlashFXP)
"Who Dares Wins" - "Quien se Arriesga Gana"
Mail me at: 
-
Apr 23rd, 2004, 06:04 PM
#6
Thread Starter
Hyperactive Member
and searching, and searching ...
still haven't found a slightest clue on the net ... but ... the hope still exists
"Who Dares Wins" - "Quien se Arriesga Gana"
Mail me at: 
-
Apr 23rd, 2004, 06:26 PM
#7
It may not be possible, I think that there is probably only one caption that is used in both instances. However, you can do what I did: Add the percentage of completion to either the beginning or the end of the existing caption while the program is processing.
-
Apr 23rd, 2004, 06:29 PM
#8
I just had a thought - what about using the system tray for your progress information?
-
Apr 23rd, 2004, 08:14 PM
#9
The picture isn't missing
flash fxp probably has two windows, one hidden. The hidden one is the one shown in the tray. Through some subclassing, it would make it seem like it belongs to the real window. This would allow a different caption for the window and the taskbar button.
-
Apr 23rd, 2004, 10:43 PM
#10
Thread Starter
Hyperactive Member
Originally posted by jdc2000
It may not be possible, I think that there is probably only one caption that is used in both instances. However, you can do what I did: Add the percentage of completion to either the beginning or the end of the existing caption while the program is processing.
had to be the beggining ...because if the caption is long enough ...it'll get converted to three little dots 
Originally posted by MartinLiss
I just had a thought - what about using the system tray for your progress information?
that might be the resource to use in the end 
Originally posted by BuggyProgrammer
flash fxp probably has two windows, one hidden. The hidden one is the one shown in the tray. Through some subclassing, it would make it seem like it belongs to the real window. This would allow a different caption for the window and the taskbar button.
Not to thrilled to get into that ... I might keep it simple after all...
it's a shame it'll really enhance the information flow for my app ...
Thanks! ... i'll keep checking just in case
"Who Dares Wins" - "Quien se Arriesga Gana"
Mail me at: 
-
Apr 23rd, 2004, 11:33 PM
#11
If I am not missing something, isn't this what you are trying to
accomplish. Form1 caption remains the same and the form
caption in the taskbar showing a percentage or something. Use
two forms and the first one is the main form with the
.ShowInTaskBar = False and the second form's .ShowInTaskBar =
True. Change form2 caption like percentage changing etc.
VB Code:
Option Explicit
'FORM1.SHOWINTASKBAR = FALSE
'NEED A TIMER - TIMER1 INTERVAL OF 1000
Private miPercent As Double
Private mbShown As Boolean
Private Sub Form_Load()
miPercent = 0
mbShown = False
Form1.Caption = "This is Form1's static caption"
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
miPercent = miPercent + 1
Form2.Caption = miPercent & "% Done"
Form1.Show
'MOVE FORM OFF OF SCREEN
If mbShown = False Then
Form2.Show vbModeless, Me
Form2.Move -10000, -10000
Form1.Show
mbShown = True
End If
End Sub
Form2 is just for the taskbar percentage caption.
Handel the click on the taskbar by minimizing the form2 thus re-
activating form1. The user can not activate form2.
VB Code:
Option Explicit
'FORM2.SHOWINTASKBAR = TRUE
Private Sub Form_Activate()
Form2.WindowState = vbMinimized
Form1.Show
End Sub
Is this right???
Just some basic logic. I'm sure with some subclassing you can make it cleaner.
Edit. Just realized that buggy suggested something similar.
Last edited by RobDog888; Apr 23rd, 2004 at 11:38 PM.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 24th, 2004, 09:32 AM
#12
Thread Starter
Hyperactive Member
yes...thanks! ...
I guess that's the better approach ... thanks to both
"Who Dares Wins" - "Quien se Arriesga Gana"
Mail me at: 
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
|