Robert_Zenz
Well-known member
Hello.
I was looking for a way to put Visual Studio into a real Full-Screen mode, including hiding the menu. I stumbled upon a macro from the bytes.com board, unfortunately it worked for me one time, and one time only. After that I have to reset/reimport all menu settings to make it work again for one more time. There is also a bug report about it over at Microsoft, but it doesn't seem like it will get fixed within some time.
I already tried to change the code, but unfortunately I'm pretty stuck.
My macro:
Anybody else has some ideas to accomplish this?
Best Regards,
Bobby
I was looking for a way to put Visual Studio into a real Full-Screen mode, including hiding the menu. I stumbled upon a macro from the bytes.com board, unfortunately it worked for me one time, and one time only. After that I have to reset/reimport all menu settings to make it work again for one more time. There is also a bug report about it over at Microsoft, but it doesn't seem like it will get fixed within some time.
I already tried to change the code, but unfortunately I'm pretty stuck.
My macro:
VB.NET:
' This is some great stuff written by Tony Liu (in addition to Simonm I think) from the bytes.com board.
Public Sub ToggleFullScreen()
DTE.ExecuteCommand("View.FullScreen")
Dim screen As System.Drawing.Rectangle = System.Windows.Forms.Screen.PrimaryScreen.Bounds
Dim cmd As Microsoft.VisualStudio.CommandBars.CommandBar = DTE.CommandBars("MenuBar")
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.Protection = Microsoft.VisualStudio.CommandBars.MsoBarProtection.msoBarNoProtection
cmd.Enabled = False
Else
' If not in full screen view
cmd.Enabled = True
cmd.Visible = True
cmd.Protection = Microsoft.VisualStudio.CommandBars.MsoBarProtection.msoBarNoMove Or _
Microsoft.VisualStudio.CommandBars.MsoBarProtection.msoBarNoChangeVisible Or _
Microsoft.VisualStudio.CommandBars.MsoBarProtection.msoBarNoChangeDock
End If
End Sub
Anybody else has some ideas to accomplish this?
Best Regards,
Bobby