Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个使用 FileSystemWatcher 在创建新文件时弹出的窗口。我怎样才能让它真正显示/成为前景窗口?MakeKeyAndOrderFront 不会让它在其他窗口前面弹出。
为了使我的窗口出现在前面、居中和集中,我在以下方面取得了成功:
NSApplication app = NSApplication.SharedApplication; app.ActivateIgnoringOtherApps(true); var win = new PreferencesWindowController().Window; win.Center(); win.MakeKeyAndOrderFront(this);