Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Full screen feature in .NET Compact Framework

0.00/5 (No votes)
14 Mar 2005 1  
Enable full screen mode in .NET compact framework applications.

Introduction

This was the conversion from my previous posted topic Having full screen without accessing the SHFullScreen API. Basically, it remain accessing the same set of native API by means of p/invoke (Platform Invoke).

  • FindWindow
  • MoveWindow
  • GetWindowRect
  • SystemParametersInfo

Using the code

In this conversion, I moved the InitFullScreen and DoFullScreen function into a new class FSEngine. Therefore, all you need to do are the below three steps, then you will be ready to ROCK! :p

First, refer the FSEngine in your project.

    Private fse As FSEngine

Second, instantiate and initialize the FSEngine class.

    ' INSTANTIATE THE FSEngine
    fse = New FSEngine
    ' INITIALIZE THE fse
    fse.InitFullScreen()

Third, switch between full screen and normal mode.

    ' SET FULL SCREEN MODE
    If fse.DoFullScreen(True) = 0 Then
        ' RESIZE YOUR MAIN WINDOW
    End If

    ' RESTORE FROM FULL SCREEN MODE
    If fse.DoFullScreen(False) = 0 Then
        ' RESIZE YOUR MAIN WINDOW
    End If

Please refer to previous topic on Full screen for more information.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here