Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Message box appears as another task
Message
From
28/12/2004 22:12:25
 
 
To
28/12/2004 19:27:18
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00972759
Message ID:
00972779
Views:
15
>Sometimes, when I display a message box, I see it as another task in the task bar. Is there a way to avoid that?

Tests with the code below support at least one answer: Calling the MessageBox.Show method (or MsgBox) within the context of another form, even one that is not visible, eliminates the appearance of the message box as a task. Showing a message box outside of a form, at least in this test, results in a taskbar button.
Imports System.windows.forms

Module module1
   Sub Main()
      MessageBox.Show("This is the modules's Messagebox.Show call.", "Module MessageBox")
      ' MsgBox("This is the modules's MsgBox call.", MsgBoxStyle.Information, "Module MsgBox Function")
      Dim MsgTest As New MsgTest
   End Sub
End Module

Public Class MsgTest
   Inherits System.Windows.Forms.Form

   Public Sub New()
      MessageBox.Show(Me, "This is the form's Messagebox.Show call.", "Form MessageBox")
      ' MsgBox("This is the form's MsgBox call.", MsgBoxStyle.Information, "Form MsgBox")
   End Sub
End Class
Christopher Bohling, Consultant
http://www.ChristopherBohling.com
Previous
Reply
Map
View

Click here to load this message in the networking platform