Put an application in FullScreen Mode

28. September 2011 03:55 by Mrojas in General  //  Tags: , , ,   //   Comments (0)

 

In Silverlight you can put an application in FullScreen mode using code like the one exposed here:

http://msdn.microsoft.com/en-us/library/cc189023(v=vs.95).aspx

However that does not allows you to start the application in FullScreen, because the application
can only enter in FullScreen with an user event.

So, one possible approach is to use javascript. So you can do something like this:

 

<HTML> 
<HEAD> 
 
<script LANGUAGE="JavaScript"> 
 
<!--
    closeTime = "2000";
    function closeTimer() {
        setTimeout("newURL()", closeTime);
    }
 
    function newURL() {
        newURLWindow = window.open("FullScreenModeTestPage.html", "redirect", "fullscreen=yes");
        self.close()
    } 
//--> 
</script> 
 
<BODY onLoad="closeTimer()"> 
<center> 
<H1>YOU WILL BE REDIRECTED; NEW A NEW WINDOW WILL OPEN IN FULLSCREEN; PRESS ALT+F4 TO CLOSE IT!</H1> 
</center> 
 </BODY> 
</HTML>

Categories