Ok, I'm extremely new to VB 2005 but I ran into something I need a hand with.
I was playing around with adding menu's to my forms (inserting the common ones etc) when I realized how much I dislike icons in the menus.
So my question is, how do I turn these off in my projects

Icons in Menus
bigman921
Heh... thanks, its alright.
The problem I really ran into, was - Microsoft did it again. Don't get me wrong, I very seldom put Microsoft down (part of the whole biting the hand that feeds).
When Microsoft released VB6 they used toolbars and menu's in the GUI which weren't possible to reproduce within the VB6 environment (you probably could using 3rd party add on's, subclassing and a pile of API calls).
When I saw the interface they have with Visual Basic 2005 I thought - that's sharp looking. But there was no way to reproduce it, then I paniced thinking I would be stuck with this ugly blue strip for icons in all my applications - no matter what setting I changed, there was no way to get rid of it. I think when a company like Microsoft doesn't use menu icons in their major products it says something about the over use of icons.
Perhaps the developers need to add a new property to the control: [UglyStrip:True|False] so people developing menu's with the GUI aren't stuck with them.
I also found when creating the menu's dynamically, the whole VB environment ran so much faster and smoother. I wish I knew how one menustrip could slow down a 1.6Ghz machine with 512MB of ram to a grinding halt. It also solved the issue I had of when the envronment would have to redraw the screen when I edited the menu's and lost half the controls I placed on my forms in the process.
I will definately be creating all my menu's using this method.
..... now, to find out why someone thought dropping the line/shape control was a good idea....
ProactiveLogic
Well I think I've got the same problem. I am creating my menu bar with the menu strip, and I have it looking exactly how I want, but each menu item has too much empty space before its label/text. I have the DisplayStyle set to Text, but that doesn't change anything. Do you basically have to create your menus with the code above in order to have it look "normal" If so, that's very stupid :(
Any help would be much appreciated! :)
Allen Kwan
That definately did the trick on the colours - thanks!
Now I like both... I'll definately need to decide on the application which menu system will best fit.
SB1
Right click on the menu item that you want to disable icons for -> Select Set Image -> In the Select Resource dialog hit the Clear button. This should get rid of the icon for the item.
You can also Right click on the menu item -> Select Properties -> Set DisplayStyle to Text.
Hope This Helps.
Stefnany
Hey Coffee guy. I just realized that this has never been a problem or me because I've never used the standard menus. I've always beun for scratch... how about you
MikeBo
Very interesting.
I was creating my menu's using that menustrip control, and no matter what I did, there was no way to remove that bar where that ugly blue strip appeared.
I searched the msdn site and came up with the following code (incase anyone else runs into it) and it appears that when you code it in that the bar in question in gone.
Thanks for the help
Public
Class Form1' Create a MainMenu object and a MenuItem object.
Private mmAppStart As MainMenu
Private miFile As MenuItem
Protected Sub MenuSelect(ByVal sender As Object, ByVal e As System.EventArgs)
Dim itemClicked As New MenuItem()
itemClicked = CType(sender, MenuItem)
MessageBox.Show("You have selected the item " & itemClicked.Text)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Create an instance of the MainMenu object.
mmAppStart = New MainMenu
' Create a top-level menu item and two menu items. Use this
' overloaded constructor that takes an event handler
' (MenuSelect) so that later, you can cause the menu
' selection to change the application state.
miFile = New MenuItem("&File", New System.EventHandler(AddressOf Me.MenuSelect))
miFile.MenuItems.Add("&New", New System.EventHandler(AddressOf Me.MenuSelect))
miFile.MenuItems.Add("&Open", New System.EventHandler(AddressOf Me.MenuSelect))
miFile.MenuItems.Add("&Exit")
' Add the top-level menu item to the MainMenu component
' and set the MainMenu component to be the form's menu.
mmAppStart.MenuItems.Add(miFile)
' Set the form's menu to the menu you have just created.
Me.Menu = mmAppStart
End Sub
End Class
Joshua Cole
I don't know because I liked that line/shape control. Every now and then, it came in handy although I don't remember using it since VB5 when i tried to glue my first project together with them.
I kept sitting back and asking why those those thing had not bothered me and then I realized....
They hadn't bothered ne because we do it differently. Yes, I really love the dynamic methods. Later you learn to declare then as Friends withevents and they'll have events and even make classes out of them with the event management in the classes.
Take care cofee guy!!!
LwnChina
abhidy
Unfortunately.
It seems when you are adding them that way, it uses that column for checks, thats why you can't completely get rid of it.
[atleast, that's what I have been able to conclude]
808
You say that you like the look of VS2005 but not the blue MenuStrip... hmm... if color is what you don't like then add the following in the New method of your form:
ToolStripManager.VisualStylesEnabled = False
With this the MenuStrip should look like the one that VS2005 uses
.
K Wenzel
alfeliche
Sometimes it really difficult to know what people are asking for.
Sometime this summer, as one of my first (presentable) dotnet programs, I write an extremely sophisticated toolbar around the toolstrip classes.
There are many menus in this toolbar and no of them could be static they are all dynamic as you have created here.
I love the way they load and this author was particularly spiffy in the way he declared event handlers.
Had I known that this is what you were looking for, I would have put that code out here a long time ago. I just could be sure what you wanted. :(