Click here to Skip to main content
11,431,844 members (62,627 online)
Click here to Skip to main content

Full screen feature in .NET Compact Framework

, 14 Mar 2005 CPOL
Rate this:
Please Sign up or sign in to vote.
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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

CT CHANG
Software Developer
Australia Australia
Passion to be a software architect and solution researcher in enterprise solutions by simplify and unify the existing complex manual paper works into an automated environment friendly, comprehensive and dynamic workflow process system.

Comments and Discussions

 
GeneralMy vote of 4 Pin
b0bi25-Jul-11 2:06
memberb0bi25-Jul-11 2:06 
GeneralThanks Pin
bigbro_198521-Mar-10 12:07
memberbigbro_198521-Mar-10 12:07 
GeneralThanks again Pin
adrienf_6912-Nov-09 6:05
memberadrienf_6912-Nov-09 6:05 
GeneralThanks Pin
minity31-Jul-08 12:17
memberminity31-Jul-08 12:17 
GeneralAn other way to full screen Pin
Andy Zhang17-Oct-07 21:25
memberAndy Zhang17-Oct-07 21:25 
GeneralRe: An other way to full screen Pin
[ .:: bicodeR ::. ]6-Dec-07 11:06
member[ .:: bicodeR ::. ]6-Dec-07 11:06 
GeneralEasy way to full screen in C# Pin
omanni29-Aug-07 5:12
memberomanni29-Aug-07 5:12 
GeneralFSEngine remains active Pin
CHP791323-Feb-07 5:07
memberCHP791323-Feb-07 5:07 
Generalthe code in C# Pin
alex_boyer10-Feb-06 0:43
memberalex_boyer10-Feb-06 0:43 
GeneralRe: the code in C# Pin
hackzai13-Feb-06 16:12
memberhackzai13-Feb-06 16:12 
GeneralRe: the code in C# Pin
danyoh13-Dec-06 20:02
memberdanyoh13-Dec-06 20:02 
GeneralRe: the code in C# Pin
ram krishna pattnayak25-Mar-08 23:23
memberram krishna pattnayak25-Mar-08 23:23 
QuestionRe: the code in C# Pin
alex_boyer25-Mar-08 23:48
memberalex_boyer25-Mar-08 23:48 
GeneralRe: the code in C# Pin
ram krishna pattnayak26-Mar-08 1:32
memberram krishna pattnayak26-Mar-08 1:32 
GeneralRe: the code in C# Pin
alex_boyer26-Mar-08 8:09
memberalex_boyer26-Mar-08 8:09 
GeneralRe: the code in C# Pin
zkshadow7-Jul-09 17:33
memberzkshadow7-Jul-09 17:33 
QuestionFSEngine in C# Pin
jamo778-Jan-06 22:28
memberjamo778-Jan-06 22:28 
GeneralFrom microsoft docs... save you some time Pin
Jason Allen Smith21-Jun-05 11:40
sussJason Allen Smith21-Jun-05 11:40 
GeneralRe: From microsoft docs... save you some time Pin
Anonymous12-Jul-05 8:29
sussAnonymous12-Jul-05 8:29 
GeneralThis does not work all time Pin
xbertx123-May-06 11:57
memberxbertx123-May-06 11:57 
GeneralRe: This does not work all time Pin
c01mr18-Jan-07 5:54
memberc01mr18-Jan-07 5:54 
GeneralRe: This does not work all time Pin
entraped.isoLated31-Jul-07 1:32
memberentraped.isoLated31-Jul-07 1:32 
GeneralGood job. Pin
SpeedySpeedy22-Mar-05 22:29
memberSpeedySpeedy22-Mar-05 22:29 
GeneralRe: Good job. Pin
c01mr18-Jan-07 5:53
memberc01mr18-Jan-07 5:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150428.2 | Last Updated 14 Mar 2005
Article Copyright 2005 by CT CHANG
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid