TopMost Window

This is a discussion on TopMost Window within the C# Programming forums, part of the General Programming Boards category; Hello everyone, Quick question. I know that when you design windows, there is a property called TopMost that causes the ...

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    184

    TopMost Window

    Hello everyone,

    Quick question. I know that when you design windows, there is a property called TopMost that causes the window to be displayed as the topmost window. How would I cause Dialog Boxes such as the OpenFile dialog box and MessageBox to do the same thing. Right now when I display the OpenFile dialog box and a MessageBox, they are behind my command window. How would I fix that??????

    Thanks,
    Kendal

  2. #2
    Registered User
    Join Date
    Oct 2003
    Posts
    6
    standard message windows (such as a system error box) cannot be top most. I encountered the same problem. There's nothing you can do about it. But that's not where your problem is: think about this: topmost means your window is on the top of the window stack. so you cannot have 2 windows topmost...

    In a general manner you want to use topmost only for splash screen, OR very important message boxes. Your application should never have the topmost attribute set.

    Plus, topmost windows are extremely polluting on a desktop.

    hope that helps

  3. #3
    Registered User
    Join Date
    Feb 2003
    Posts
    184
    So there is nothing I can do about my messageboxes and open file dialog box poping up in the background. It is annoying because the messagebox will be pop up and I will never know it. There is nothing that can be done about that?????????

    Thanks,
    Kendal

  4. #4
    Registered User
    Join Date
    Oct 2003
    Posts
    6
    no. topmost MEANS topmost.
    Like I said, you use topmost for splash screens, status windows or very important message.

    Your application window should NEVER use the topmost attribute. It's that simple.

    sorry

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C or C++
    By AcerN30 in forum Game Programming
    Replies: 41
    Last Post: 05-30-2008, 06:57 PM
  2. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 08:23 AM
  3. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 10:06 AM
  4. Pong is completed!!!
    By Shamino in forum Game Programming
    Replies: 11
    Last Post: 05-26-2005, 10:50 AM
  5. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21