Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling thread must be STA
Message
De
16/07/2010 11:55:51
 
 
À
16/07/2010 10:54:02
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01472690
Message ID:
01472719
Vues:
53
Thank-you for that tip. However, the main entry point already has the declaration [STAThread]:

[STAThread]
public static void Main(string[] args)
{
// Instantiate the Application object
App = new AppWPF();

// Set the ShowInTaskbar default
mmAppWPF.WindowManager.ShowInTaskbarDefault = ShowWindowsInTaskbarDefault;

bool? Result = true;

//// Display the login window
//UserLoginWindow LoginWindow = new UserLoginWindow();
//Result = LoginWindow.ShowDialog();

if (Result == true)
{
App app = new App();
app.InitializeComponent();
// Instantiate the main application window
mainWindow = new MainWindow();

This last statement leads directly to the code I posted earlier which fails with the error.

I would appreciate any other suggestions you might have.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform