Click here to Skip to main content
12,451,232 members (51,754 online)
Click here to Skip to main content
Add your own
alternative version

Stats

114.5K views
730 downloads
56 bookmarked
Posted

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.

You may also be interested in...

Pro
Pro

Comments and Discussions

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

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