开发者

Bring NSRunAlertPanel Dialogue to Front in Background Process

If you call

NSRunAlertPanel()

from a background process in Cocoa, the dialogue does not come to the front and instead stays behind other windows. This post shows that you can bring the dialogue to the front if you convert the process to a f开发者_开发知识库oreground process. If you keep the process a background process, however, is there any way to achieve this behavior?


What are you trying to do? Background processes can still display UI and bring themselves to the front without using TransformProcessType; just make sure you are a LSUIElement, not LSBackgroundOnly (or the deprecated NS* equivalents). The only reason you typically need to use TransformProcessType is if you want a Dock icon or menu bar.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜