Results 1 to 12 of 12

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

Threaded View

  1. #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

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