fullscreen

How to know if a NSWindow is fullscreen in Mac OS X Lion?

早过忘川 提交于 2019-11-30 17:31:05
I guess I should check if [NSApplication presentationOptions] contains NSFullScreenModeApplicationPresentationOptions , but how do I achieve that? EDIT: using [NSApplication presentationOptions] doesn't work as in my document-based app there might be some documents in fullscreen and others not. I'm now looking for another solution. I'm wondering why there isn't a property called [NSWindow isFullscreen] or something like that. I was just looking for a solution myself and based on Matthieu's answer I created a category on NSWindow that works fine for me. @interface NSWindow (FullScreen) - (BOOL

Request Full Screen HTML5 Video onPlay

强颜欢笑 提交于 2019-11-30 17:20:17
问题 I'm using the following code to trigger fullscreen when a user clicks on the play button on a <video> element: var video = $("#video"); video.on('play', function(e){ if (video.requestFullscreen) { video.requestFullscreen(); } else if (video.mozRequestFullScreen) { video.mozRequestFullScreen(); } else if (video.webkitRequestFullscreen) { video.webkitRequestFullscreen(); } }); But nothing happens when I click the play button. Any idea's why? EDIT: Here's my HTML code: <video width="458" height=

AWT Frame in full-screen exclusive mode gets minimized on windows dialog popup

我是研究僧i 提交于 2019-11-30 16:43:55
i am developing an application which uses an awt frame in full-screen exclusive mode. Everythings works fine until a windows popup gets visible. This will steal the focus and my application will be minimized. Here is my init code of the frame: if (ApplicationConfig.getInstance().useFullscreenMode()) { frame.setUndecorated(true); frame.setResizable(false); if (monitor.isFullScreenSupported()) { monitor.setFullScreenWindow(frame); if (monitor.isDisplayChangeSupported()) { DisplayMode defaultMode = new DisplayMode( (int) appDimension.getWidth(), (int) appDimension.getHeight(), 32, DisplayMode

MPMoviePlayerController can exit fullscreen but topbar is gone

二次信任 提交于 2019-11-30 16:25:40
I am streaming a movie on the iPad using MPMoviePlayerController . When the user rotates the device to landscape, I animate it to fullscreen . If the user then taps ' exit fullscreen ' or 'done', the movie animates back to its small frame (native behavior), BUT-- the top bar (navigation bar) is gone . Also, the visible views have moved upwards, behind and beyond the status bar. Note that I haven't touched the top bar whatsoever. I have not manually hidden it. I have tried regaining the navigation bar by sending setNavigationBarHidden:animated to the current viewcontroller's navigation

AWT Frame in full-screen exclusive mode gets minimized on windows dialog popup

情到浓时终转凉″ 提交于 2019-11-30 16:23:56
问题 i am developing an application which uses an awt frame in full-screen exclusive mode. Everythings works fine until a windows popup gets visible. This will steal the focus and my application will be minimized. Here is my init code of the frame: if (ApplicationConfig.getInstance().useFullscreenMode()) { frame.setUndecorated(true); frame.setResizable(false); if (monitor.isFullScreenSupported()) { monitor.setFullScreenWindow(frame); if (monitor.isDisplayChangeSupported()) { DisplayMode

Is there an API for vista to detect if the desktop is running full screen?

久未见 提交于 2019-11-30 16:20:07
e.g, Is the user playing a movie full screen, or looking at powerpoint in full screen mode? I could have sworn I saw a IsFullScreenInteractive API before, but can't find it now Here's how I've solved this problem: using System; using System.Collections.Generic; using System.Data; using System.Diagnostics; using System.Runtime.InteropServices; namespace Test { class Program { static void Main(string[] args) { Console.WriteLine(IsForegroundWwindowFullScreen()); } [DllImport("user32.dll")] static extern IntPtr GetForegroundWindow(); [DllImport("user32.dll")] static extern int GetSystemMetrics(int

Is there an API for vista to detect if the desktop is running full screen?

ε祈祈猫儿з 提交于 2019-11-30 15:58:00
问题 e.g, Is the user playing a movie full screen, or looking at powerpoint in full screen mode? I could have sworn I saw a IsFullScreenInteractive API before, but can't find it now 回答1: Here's how I've solved this problem: using System; using System.Collections.Generic; using System.Data; using System.Diagnostics; using System.Runtime.InteropServices; namespace Test { class Program { static void Main(string[] args) { Console.WriteLine(IsForegroundWwindowFullScreen()); } [DllImport("user32.dll")]

C# hold key in a game application

空扰寡人 提交于 2019-11-30 15:31:35
问题 I'm trying to make a C# application, which is going to control a game. That I'm trying to do is for example: Hold key A for 150ms, Hold left arrow for 500ms and so on. I was searching a lot and I found the following code. My program firstly target the game and then holding the keys. I'm holding the keys this way: Keyboard.HoldKey(Keys.Left); Thread.sleep(500); Keyboard.ReleaseKey(Keys.Left); Here is the Keyboard class: public class Keyboard { public Keyboard() { } [StructLayout(LayoutKind

Hide TaskBar in WinForms Application [duplicate]

送分小仙女□ 提交于 2019-11-30 15:29:45
This question already has an answer here: How do I make a WinForms app go Full Screen 8 answers How can I hide the Windows taskbar when I run my C# WinForms application? I tried some code, but it opens in maximized view with the taskbar. Do you have any sample code or suggestions? Just add this class into your project .it works as you expected. using System; using System.Runtime.InteropServices; public class Taskbar { [DllImport("user32.dll")] private static extern int FindWindow(string className, string windowText); [DllImport("user32.dll")] private static extern int ShowWindow(int hwnd, int

Borderless window application takes up more space than my screen resolution

故事扮演 提交于 2019-11-30 15:08:27
问题 I have created a borderless application in WPF, and it works pretty good. However, when I set the WindowState to full screen, the application takes up more space than my screen resolution, so there are some pixels outside the screen in all directions! (looks like some hard coded negative margins are added to hide the default border) Any Ideas how to prevent this from happening? My xaml: <Window x:Class="MyApp.Shell" WindowStyle="None" BorderThickness="0" AllowsTransparency="True" Background=