Real Full Screen of the VS IDE

  • Thread starter Thread starter Tony Liu
  • Start date Start date
T

Tony Liu

Hi, when switched to the full screen mode in VS.NET IDE, is there any way to
hide the main menu bar?

Thanks
Tony
 
Thanks for replying, but I mean the menu bar in the Visual Studio.NET itself
when I switch to full screen mode.
Anyways, thanks for replying.

Tony
 
It doesn't look like it, does it?
If you right click on the menu bar and choose "Customize", there are
options for what to show or hide. Trying to uncheck "MenuBar" just beeps at
me.

That would suggest that Microsoft don't want you to do that. :|

Perhaps time to explore VS.Net Plugins... ;)

Cheers,
Simon.
 
Hmm, if anyone's interested I've had a look at a VS.Net plugin to do
this.

Starting with an Add-In using the wizard, by enumerating through the
application command bars and I can get to the "FullScreen" button and
subscribe to its 'Click' Event.

Inside that, I can find the MenuBar, which is a good start.

Setting bar.Visible=false throws an "Unspecified error".
Setting bar.Enabled=false gets rid of it as required (I don't know what
side-effects it might have).

But I can't get it back!

Setting enabled to true does nothing. I've been toying with
CommandBars.Add, and it appears tantalisingly for a moment, then throws a
"The parameter is incorrect" error...

Any ideas?

Code at http://www.alysseum.com/vsaddin.html

Cheers,
Simon.
 
Thanks for reply, do you mean that your can't get the menu bar back even if
your added isn't loaded? or you just can't get it back during your addin's
session?

Tony
 
Hello Tony,

I don't think you could remove menu bar in full mode in IDE settings.
However, as Simon mentioned, you may be able to achieve it by developing an
add-in.

BTW, vsnet->IDE should be the best group for this question. :)

Thanks.

Best regards,
yhhuang
VS.NET, Visual C++
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net? http://www.gotdotnet.com
--------------------
!From: "Tony Liu" <[email protected]>
!References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
!Subject: Re: Real Full Screen of the VS IDE
!Date: Thu, 10 Jul 2003 09:35:16 +0800
!Lines: 51
!X-Priority: 3
!X-MSMail-Priority: Normal
!X-Newsreader: Microsoft Outlook Express 6.00.3790.0
!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
!Message-ID: <[email protected]>
!Newsgroups: microsoft.public.dotnet.languages.csharp
!NNTP-Posting-Host: cm203-168-247-148.hkcable.com.hk 203.168.247.148
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:168110
!X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
!
!Thanks for reply, do you mean that your can't get the menu bar back even if
!your added isn't loaded? or you just can't get it back during your addin's
!session?
!
!Tony
!
!
!!> Hmm, if anyone's interested I've had a look at a VS.Net plugin to do
!> this.
!>
!> Starting with an Add-In using the wizard, by enumerating through the
!> application command bars and I can get to the "FullScreen" button and
!> subscribe to its 'Click' Event.
!>
!> Inside that, I can find the MenuBar, which is a good start.
!>
!> Setting bar.Visible=false throws an "Unspecified error".
!> Setting bar.Enabled=false gets rid of it as required (I don't know what
!> side-effects it might have).
!>
!> But I can't get it back!
!>
!> Setting enabled to true does nothing. I've been toying with
!> CommandBars.Add, and it appears tantalisingly for a moment, then throws a
!> "The parameter is incorrect" error...
!>
!> Any ideas?
!>
!> Code at http://www.alysseum.com/vsaddin.html
!>
!> Cheers,
!> Simon.
!>
!> !>
!> > Perhaps time to explore VS.Net Plugins... ;)
!>
!> > !> >
!> >> Thanks for replying, but I mean the menu bar in the Visual Studio.NET
!> >> itself when I switch to full screen mode.
!> >> Anyways, thanks for replying.
!> >>
!> >> Tony
!>
!
!
!
 
Actually we can just use Macro to do this. What I do is, first toggle the
FullScreen command, and then determine whether the IDE is now in FullScreen
mode or not by comparing the main window's bounds to the screen bounds. I
found that when the IDE is in FullScreen mode, it's bounds is always equals
to the screen bounds (provided that the status bar is not visible), and in
normal mode, the location of the IDE are (-4, -4) when maximized on my
computer. After that, just enable or disable the menu bar at will. Also,
after re-enabling the menu bar, we need to set the Visible to true.

It works well for me for the last couple days.

Simonm, thanks for your code sample.



Sub ToggleFullScreen()

DTE.ExecuteCommand("View.FullScreen")

Dim screen As System.Drawing.Rectangle
screen = System.Windows.Forms.Screen.PrimaryScreen.Bounds

Dim cmd As Microsoft.Office.Core.CommandBar
cmd = DTE.CommandBars("MenuBar")
cmd.Protection =
Microsoft.Office.Core.MsoBarProtection.msoBarNoProtection

If DTE.MainWindow.Left = screen.Left And DTE.MainWindow.Top =
screen.Top And _
DTE.MainWindow.Width = screen.Width And DTE.MainWindow.Height =
screen.Height Then
' If in full screen view
cmd.Enabled = False
Else
' If not in full screen view
cmd.Enabled = True
End If

If cmd.Enabled Then cmd.Visible = True

End Sub
 
Back
Top