Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Message box appears as another task
Message
De
28/12/2004 22:12:25
Chris Bohling
Myers and Stauffer LC
Shawnee, Kansas, États-Unis
 
 
À
28/12/2004 19:27:18
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00972759
Message ID:
00972779
Vues:
17
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform