开发者

Handle forced full-screen and disable minimizing

I am working on porting an XNA game to another platform. Some of the items in the compliance check list involve making sure the game remains in full-screen mode, cannot be minimized and that the windows key, win - m, and alt-tab are disabled. The only way to exit the game is supposed to be through the platform API (think exiting an Xbox or PS3 game by pressing the home or guide buttons).

It been difficult to find any information on this since most responses to previous questions are "never remove system functionality" but in my case specifically, those are requirements.

So is there a way to handle forced full-screen and disable minimizing? I haven't been able to find a way to get WndProc to work. Likewise for key events I need to disable. I can't find a way to intercept and handle the windows messages that control开发者_开发问答 these events.


This post seems to give the interop code needed for hooking into the window message loop and overriding the Windows key events:

Disable Special Keys in Win App C#


Will the .IsFullScreen = true property not solve your issue? It will help with the screen but not with the keyboard disablement.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜