Results 1 to 12 of 12

Thread: Keep form caption ...but change Taskbar caption...how?

  1. #1

    Thread Starter
    Hyperactive Member D12Bit's Avatar
    Join Date
    Oct 2000
    Location
    Guatemala
    Posts
    373

    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:

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758
    Change the Caption based on the WindowState property.

    VB Code:
    1. If WindowState = vbMinmized then
    2.           Caption = "Percentage"
    3.     Else
    4.           Caption = "Normal view"
    5.     End If

  3. #3

    Thread Starter
    Hyperactive Member D12Bit's Avatar
    Join Date
    Oct 2000
    Location
    Guatemala
    Posts
    373
    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:

  4. #4
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    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.

  5. #5

    Thread Starter
    Hyperactive Member D12Bit's Avatar
    Join Date
    Oct 2000
    Location
    Guatemala
    Posts
    373
    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:

  6. #6

    Thread Starter
    Hyperactive Member D12Bit's Avatar
    Join Date
    Oct 2000
    Location
    Guatemala
    Posts
    373
    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:

  7. #7
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,526
    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.

  8. #8

  9. #9
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    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.

  10. #10

    Thread Starter
    Hyperactive Member D12Bit's Avatar
    Join Date
    Oct 2000
    Location
    Guatemala
    Posts
    373
    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:

  11. #11
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    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:
    1. Option Explicit
    2. 'FORM1.SHOWINTASKBAR = FALSE
    3. 'NEED A TIMER - TIMER1 INTERVAL OF 1000
    4. Private miPercent As Double
    5. Private mbShown As Boolean
    6.  
    7. Private Sub Form_Load()
    8.     miPercent = 0
    9.     mbShown = False
    10.     Form1.Caption = "This is Form1's static caption"
    11.     Timer1.Enabled = True
    12. End Sub
    13.  
    14. Private Sub Timer1_Timer()
    15.     miPercent = miPercent + 1
    16.     Form2.Caption = miPercent & "% Done"
    17.     Form1.Show
    18.     'MOVE FORM OFF OF SCREEN
    19.     If mbShown = False Then
    20.         Form2.Show vbModeless, Me
    21.         Form2.Move -10000, -10000
    22.         Form1.Show
    23.         mbShown = True
    24.     End If
    25. 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:
    1. Option Explicit
    2. 'FORM2.SHOWINTASKBAR = TRUE
    3. Private Sub Form_Activate()
    4.     Form2.WindowState = vbMinimized
    5.     Form1.Show
    6. 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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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

  12. #12

    Thread Starter
    Hyperactive Member D12Bit's Avatar
    Join Date
    Oct 2000
    Location
    Guatemala
    Posts
    373
    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
  •  



Click Here to Expand Forum to Full Width