Click to See Complete Forum and Search --> : move menues between forms
Juliane
September 7th, 2001, 04:05 PM
the book tells me to open the form in wordpad, cut the menu items open the other form in wordpad as well, paste the menu items save both forms come out of wordpad and open VB and teh menu will be moved. everytime i try I lose all teh code and nothing has changed in vb. where do i go wrong? did i save it in the wrong format? (which one is the right one?)
many thanks for any help!!!
John G Duffy
September 8th, 2001, 09:21 AM
In addition to copying the Menu declarations, you will need to copy the associated subroutines from the Form. Here is a sample of the stuff I copied successfully. You also need to ensure the Menu Declarations are pasted within the proper Begin .. End sequence of the form. It needs to be between the Begin VB.Form and its corresponding End statement.
Begin VB.Menu mnuFile
Caption = "File"
Begin VB.Menu mnuOpen
Caption = "OPen"
End
Begin VB.Menu mnuClose
Caption = "Close"
End
Begin VB.Menu mnuNew
Caption = "new"
End
End
'
private Sub mnuClose_Click()
' This is the Code for MenuClose
End Sub
private Sub mnuFile_Click()
' Code for MenuFile
End Sub
private Sub mnuNew_Click()
' Code for menuNew
End Sub
private Sub mnuOpen_Click()
'This is the Code for Menu Open
End Sub
John G
Picky
September 8th, 2001, 10:25 PM
http://www.angelfire.com/ny3/visualbasic/7.html
That explains how to make a menu... without programming everything behind it (Using MS VB 4.0+).
-Picky
Juliane
September 9th, 2001, 05:49 AM
which format do I have to save the form in wordpad in without losing code?
John G Duffy
September 9th, 2001, 01:31 PM
it needs to be stored in Text format with a file extension of .frm
John G
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.