> No... The application I'm writing is not multithreaded (there are some areas > where it is, but that is working fine)...
Hm, a pity, that would've explained it so nicely :) On the other hand, since you're probably using .NET 2.0, this kind of errors is usually detected by Windows.Forms anyway. But just to make completely sure because you say there are some areas where it is multi-threaded: Does your application never access a GUI control or window from a different thread than the UI thread (which is usually the one calling Application.Run)? > I suspect it has something to do with invalid/wrong parent windows. But I > think it has something to do with having 2 modal dialog boxes open (ie. > chained)... which I do have. My simplistic testing seems to indicate this is > ok, but I guess in the real world this isn't advisable. This is actually supported quite fine by Windows (and thus by .NET; Windows.Forms uses Windows for all that Z-Order and modality handling). You can use the tool Spy++ that comes with Visual Studio to better diagnose issues like this. Try to reproduce the situation, then fire up Spy++, find your dialog windows (either in the tree or using the window finder tools), and inspect their properties. Look at the styles (compare them with modal dialogs in other applications and look up their meaning in the MSDN docs) and the related windows (especially parent and owner). Maybe you find out something that way. You could also ask at a Win32-related newsgroup or forum whether there are any known issues with Win32 dialog windows that would cause the behavior you are seeing. > I was mainly using modality as a focal point - which could I guess be > achieved using the ownership rather than on modality. Input blocking would > be a problem. Any ideas? For input blocking, you could also disable the window. But I still know that what you want is possible in Windows and .NET, so I'd rather try to find the problem. But maybe you just want a quick fix. :) Fabian =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com