DisplayFullScreen after window is Maximized

simmons84

New Member
Joined
Nov 21, 2011
Messages
35
I know how to use Application.DisplayFullScreen = True to enlarge the screen upon openning the excel file. But, when you minimize the screen and then maximize it again, the full screen goes back to normal. How do you force the screen to stay Full Screen?

Thanks,

Chris
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
I tried, but it doesn't work.

Code:
Private Sub Workbook_Activate()
    Application.DisplayFullScreen = True
End Sub
[code/]
 
I start out with Excel oopen and maximized and Full Screen mode.  Then I minimize Excel to the task bar.  When I click on it again, the Full screen goes back to normal view.  Any other thoughts?
 
Upvote 0
Excel is actually working correctly – it will come out of the Full Screen Mode whenever it is Resized. Unfortunately what sounds like a very simple request turns out to be a lot more complex.

Using Workbook_Activate() will trigger when you switch Workbooks, Not when you Minimize or Maximize the Excel Application which is what you are actually asking for.

Another technique using a Class for example will also fail because it will capture a Window or Workbook Resize or Activate Event which again is Not the Excel Application Minimize or Maximize.

A CBT Hook will work to some extent allowing you to capture the HCBT_MINMAX Message to Excel and then further querying LowW(lParam) = SW_MAXIMIZE or SW_RESTORE. I do not advise going down this route unless you want to spend some time watching Excel fall over (although I do have a stable hook should you wish to use it)...

I use a fine timer thread to capture an exit from Full Screen via a Resize or Escape being pressed Excel 2007/2010 when I re-style the Excel Application from a true Full Screen View. It by no means an ideal solution but perhaps this is something that you could consider. You could fire the thread for say every 1/10th of a second and force Excel Full Screen should you capture an Application.WindowState = xlMaximized following a Minimize to the Taskbar.

Unless anyone else can offer an alternative method, it may be worth trying.

I have an (old) article on a Timer here: http://ezinearticles.com/?Excel-Full-Screen-View---The-Fundamentals&id=5838401
Alternatively if you email me I can send you a CBT Hook, rudimentary but working at least! Good luck. mark@kubiszyn.co.uk
 
Upvote 0
This will keep the excel screen maximized even after minimizing it without the need to use a hook or a timer:

Code:
Sub Test1()
    Application.ExecuteExcel4Macro "Show.ToolBar(""Ribbon"", False)"
End Sub

To restore excel back to normal use this :

Code:
Sub Test2()
    Application.ExecuteExcel4Macro "Show.ToolBar(""Ribbon"", True)"
End Sub
 
Upvote 0
Nice one, good work around. Works like a treat in Excel 2010. Sometimes you don't see what's right in front of you!

... Mark.
 
Upvote 0

Forum statistics

Threads
1,215,701
Messages
6,126,289
Members
449,308
Latest member
VerifiedBleachersAttendee

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top