Jump to content
Xtreme .Net Talk

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


Recommended Posts

Posted

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

 

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 menu's adding them to work. I looked all over google and found nothing. Too much articles on VS.net.

 

Please help, thanks and appreciated.

  • *Experts*
Posted

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. It's not too hard to figure out though.

Posted

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...

 

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...

 

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

Being smarter than you look is always better than looking smarter than you are.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...