where is menu editor in visual studio.net(visual basic) + "not declared" error questi

bi0h4z4rd

New member
Joined
Jul 10, 2003
Messages
3
where is menu editor in visual studio.net(which is assume is visual basic 7)?

For now I have to add it using the Toolbox > Windows Forms on the left.

WHICH I DONT WANT TO DO BECAUSE I HAVE A "SAMS TEACH YOURSELF VISUAL BASIC 6" BOOK AND WANT TO LEARN.

I want Menu Editor.

Also,

Since Im using the Windows Forms, I looked at the code and manually added:

Private Sub MenuItem21_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MenuItem21.Click
Intcracker = MsgBox("Created by Tyler Ward", MsgBoxStyle.OKOnly, "About...")
End Sub

This is for the HELP section (im creating a program that does nothing. Just learning)

The error is: Name Intcracker is not declared.

More info:

C:\Documents and Settings\bi0h4z4rd\My Documents\Visual Studio Projects\WindowsApplication2\My Projects\Form1.vb(240): Name Intcracker is not declared.


Can someone help and also provide a DETAILED and more guide to making menus adding them to work. I looked all over google and found nothing. Too much articles on VS.net.

Please help, thanks and appreciated.
 
There is no menu editor in VB.NET like in VB6; if you add a MainMenu component to your form you can design the Menus visually (even more easily than in the menu editor of VB6). Then you can just double click a menu item to add code to it.

If you want anything really detailed, either read about it in the MSDN, or buy a .NET book. Its not too hard to figure out though.
 
Listen to divil. He is wise beyond comprehension! As for your second issue, you just need to declare Intcracker as what ever type you need it to be...

Code:
Private Sub MenuItem21_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MenuItem21.Click
Dim Intcracker As Type Type being whatever type you want (e.g. Interger, Object, etc...)
Intcracker = MsgBox("Created by Tyler Ward", MsgBoxStyle.OKOnly, "About...")
End Sub
Although, there really is no need for a variable if all you want to do is show a MessageBox. You could simply show the MessageBox...

Code:
Private Sub MenuItem21_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MenuItem21.Click
MessageBox.Show("Created by Tyler Ward", MsgBoxStyle.OKOnly, "About...")
End Sub
 
Back
Top