Click here to Skip to main content
15,881,172 members
Articles / Mobile Apps / Windows Mobile

Full screen feature in .NET Compact Framework

Rate me:
Please Sign up or sign in to vote.
4.00/5 (8 votes)
14 Mar 2005CPOL 132.8K   879   57   26
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.

VB.NET
Private fse As FSEngine

Second, instantiate and initialize the FSEngine class.

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

Third, switch between full screen and normal mode.

VB.NET
' 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)


Written By
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 1:06
b0bi25-Jul-11 1:06 
GeneralThanks Pin
bigbro_198521-Mar-10 11:07
professionalbigbro_198521-Mar-10 11:07 
GeneralThanks again Pin
adrienf_6912-Nov-09 5:05
adrienf_6912-Nov-09 5:05 
GeneralThanks Pin
minity31-Jul-08 11:17
minity31-Jul-08 11:17 
GeneralAn other way to full screen Pin
Andy Zhang17-Oct-07 20:25
Andy Zhang17-Oct-07 20:25 
GeneralRe: An other way to full screen Pin
[ .:: masterik ::. ]6-Dec-07 10:06
[ .:: masterik ::. ]6-Dec-07 10:06 
GeneralEasy way to full screen in C# Pin
omanni29-Aug-07 4:12
omanni29-Aug-07 4:12 
GeneralFSEngine remains active Pin
CHP791323-Feb-07 4:07
CHP791323-Feb-07 4:07 
Generalthe code in C# Pin
alex_boyer9-Feb-06 23:43
alex_boyer9-Feb-06 23:43 
GeneralRe: the code in C# Pin
CT CHANG13-Feb-06 15:12
CT CHANG13-Feb-06 15:12 
GeneralRe: the code in C# Pin
danyoh13-Dec-06 19:02
danyoh13-Dec-06 19:02 
GeneralRe: the code in C# Pin
ram krishna pattnayak25-Mar-08 22:23
ram krishna pattnayak25-Mar-08 22:23 
QuestionRe: the code in C# Pin
alex_boyer25-Mar-08 22:48
alex_boyer25-Mar-08 22:48 
GeneralRe: the code in C# Pin
ram krishna pattnayak26-Mar-08 0:32
ram krishna pattnayak26-Mar-08 0:32 
GeneralRe: the code in C# Pin
alex_boyer26-Mar-08 7:09
alex_boyer26-Mar-08 7:09 
GeneralRe: the code in C# Pin
zkshadow7-Jul-09 16:33
zkshadow7-Jul-09 16:33 
QuestionFSEngine in C# Pin
jamo778-Jan-06 21:28
jamo778-Jan-06 21:28 
GeneralFrom microsoft docs... save you some time Pin
Jason Allen Smith21-Jun-05 10:40
sussJason Allen Smith21-Jun-05 10:40 
GeneralRe: From microsoft docs... save you some time Pin
Anonymous12-Jul-05 7:29
Anonymous12-Jul-05 7:29 
GeneralThis does not work all time Pin
xbertx123-May-06 10:57
xbertx123-May-06 10:57 
GeneralRe: This does not work all time Pin
c01mr18-Jan-07 4:54
c01mr18-Jan-07 4:54 
GeneralRe: This does not work all time Pin
entraped.isoLated31-Jul-07 0:32
entraped.isoLated31-Jul-07 0:32 
GeneralGood job. Pin
SpeedySpeedy22-Mar-05 21:29
SpeedySpeedy22-Mar-05 21:29 
GeneralRe: Good job. Pin
c01mr18-Jan-07 4:53
c01mr18-Jan-07 4:53 

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

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