Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling thread must be STA
Message
From
16/07/2010 11:55:51
 
 
To
16/07/2010 10:54:02
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01472690
Message ID:
01472719
Views:
52
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform