• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 186
  • Last Modified:

Modal form doesn't show up in Windows Task Bar

I am loading an application modal login form.  If I tab away from it it does not show up again and it is not shown in the task bar.  Is there any way to make it show up in the task bar.  Yes, i do have ShowInTaskbar set to true.  I would like it to stay modal becuase it is loaded as part of a startup module.  I could use a doevents while the form is visible but it just seems that there is a better way.  Is there?
0
emidiod
Asked:
emidiod
1 Solution
 
watyCommented:
The solution, is hiding other windows or disabling them.
0
 
emidiodAuthor Commented:
I do not have any other windows visible in the app.  I am just starting the app and loading only the login form
0
 
clifABBCommented:
Does the form have a caption?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
emidiodAuthor Commented:
Yes it does have a caption but no control box
0
 
mcixCommented:
You are loading the Login Form from a Sub Main()?

0
 
emidiodAuthor Commented:
Yes I am loading it from a Sub Main()
0
 
mcixCommented:
Unfortunately this is by design and there is no real way to do what you want.  

MS has an article about it @:

http://support.microsoft.com/support/kb/articles/q178/7/54.asp




0
 
twardCommented:
Note that in VB4 it does show in the task bar!!  This is a change between VB4 and VB5+......

PRB: Modal Form Does Not Appear in the Taskbar
Last reviewed: August 7, 1998
Article ID: Q178754
--------------------------------------------------------------------------------

The information in this article applies to:
Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, versions 5.0, 6.0

SYMPTOMS
A form displayed modally does not appear in the taskbar.

RESOLUTION
To have a form appear in the taskbar, show the form as a non-modal form. The MORE INFORMATION section below shows how to show a form in the taskbar.

STATUS
This behavior is by design.

MORE INFORMATION
By Windows user interface design standards, modal forms do not appear in the system taskbar. The next section shows you how to create a sample project that simulates a modal form so that the form appears in the taskbar.

Step-by-Step Example

Start a new Standard EXE project in Visual Basic. Form1 is created by default.

Add a CommandButton to the Form1 form.

Add a second Form to the project. Add a CommandButton to the Form2 form.

Copy the following code to the Code window of the Form1 form:


      Option Explicit
      Private Sub Command1_Click()
          Form1.Enabled = False
          Form2.Show
      End Sub


Copy the following code to the Code window of the Form2 form:


      Option Explicit
      Private Sub Command1_Click()
          Unload Form2
          Form1.Enabled = True
          Form1.SetFocus
      End Sub


On the Run menu, click Start or press the F5 key to start the program. On the Form1 form, click the CommandButton to display the Form2 form. Note that the Form2 form also appears in the taskbar.  

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now