loffing.4



I'm in the process of building a C# program. It uses a ColorDialog and a couple MessageBox.Show's. These dialogs have been working fine for a few days. Now however, whenever one of these dialogs should be displayed, the dialog never comes up and the program just freezes. This happens in both debugging and normal modes.

I know this description is pretty general, but I was just wondering if anyone had come across this before.


Re: Visual C# General Dialogs Cause Program to Freeze

Mark Dawson

Hi,

any multithreaded programming at all in your code

Mark.






Re: Visual C# General Dialogs Cause Program to Freeze

Matthew Watson

Does it say [STAThread] or [MTAThread] next you your program's Main() method

I think it needs to be [STAThread] if you use a ColorDialog in your program.




Re: Visual C# General Dialogs Cause Program to Freeze

loffing.4

My program's main method has [STAThread] next to it.

Also, there is some multi-threading in my program. The program is an OpenGL worldbuilder. It's a lab assignment for a class and the instructor provided a camera class that he said was multi-threaded. I don't really know much about how it's written.





Re: Visual C# General Dialogs Cause Program to Freeze

Mark Dawson

Hi,

what version of .Net are you using

Thanks

Mark.






Re: Visual C# General Dialogs Cause Program to Freeze

loffing.4

.NET 2.0



Re: Visual C# General Dialogs Cause Program to Freeze

JDPeckham

sounds like you need to ask your instructor why his software doesn't work with modal dialogs.




Re: Visual C# General Dialogs Cause Program to Freeze

Figo Fei - MSFT

Hi, loffing

I'd suggest you to use ProcessExplorer to see which process make your system freeze.

Thanks