CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2001
    Posts
    2

    move menues between forms

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


  2. #2
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: move menues between forms

    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

  3. #3
    Join Date
    Aug 2001
    Posts
    14

    Re: move menues between forms

    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


  4. #4
    Join Date
    Sep 2001
    Posts
    2

    Re: move menues between forms

    which format do I have to save the form in wordpad in without losing code?


  5. #5
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: move menues between forms

    it needs to be stored in Text format with a file extension of .frm

    John G

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured