How to Show VB APP in TaskBar

Posted on 2004-11-03
Last Modified: 2008-02-01
I have an app written in VB 6.0 SP6.  When I open my app the main form appears on the screen and an entry also appears in the Windows Task Bar.  The description of the item in the task bar is the same as the caption on the main form.  As soon as I go to another form the Windows Task Bar entry dissapears.  Every time I return to the Main form an entry is again placed in the Task Bar.  Internally, when I go from the main form to the other forms I hide the main form and open the other forms with a statement such as 'frmCoverSheet.Show vbModal'.  The forms are all independant of one another (not midi).

I would like the entry to stay in the task bar the entire time that the APP is running.  What do I need to do?
Question by:mlcktmguy
    LVL 32

    Expert Comment

    You may try this:

    Me.Windowstate = vbMinimized

    Form2.Show vbModal

    Me.Windowstate = vbNormal
    LVL 32

    Accepted Solution

    Instead of hiding the form using the .Visible property, perhaps move it offscreen while the other form is displayed:

    Dim x As Long, y As Long

    x = Me.Left
    y = Me.Top

    'Move offscreen
    Me.Move Screen.Width


    'Show modal form
    Form2.Show vbModal

    Me.Move x, y
    LVL 5

    Expert Comment


    If you don't show your forms as vbModal they get a TaskBar entry.  Since you are hiding before showing the next form you'll only have one TaskBar entry.

    Of course your coding may not be suited to that change.


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
    I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now