archanox's picture

ColorDialog and MessageBox not displaying properly?

I just switched my project over to OpenTK from Tao since I was having some trouble getting it to render text properly. I'm using Windows.Forms with an embedded GLControl, and the application goes fullscreen. Things are working quite well under OpenTK but I noticed a really odd bug pop up. When I'm calling ShowDialog() on a ColorDialog or Show() on a MessageBox, they aren't showing up, they seem to be behind the application. If I hit the alt button, they come to front and I'm able to use them properly. What's even more odd is that I have several OpenFileDialog that show up just fine when I ShowDialog(). Any idea why something like this might be happening?


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

AFAIK, Windows don't allow dialogs to appear on top of fullscreen applications. I have seen the same behaviour in other applications, where pressing 'alt' brings the dialog box on top - I guess this is somehow linked to the input focus.

Some things to try:

  1. Set the owner of the dialog box or the color dialog.
  2. Set the TopMost (or was it called AlwaysOnTop?) property to true for the dialog.
  3. Set the TopMost property to false for the main form before displaying the dialog.
  4. Test with the main Form in windowed-mode - do the dialogs appear correctly?