Results 1 to 7 of 7

Thread: copying and pasting a form

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Location
    ottawa, canada
    Posts
    233

    Question copying and pasting a form

    is there a quick way of copying and pasting a whole form (including code within the form load) to another form, without needing to select every element of that form.

    Thanks for any assistance.

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: copying and pasting a form

    Originally posted by sparkash
    is there a quick way of copying and pasting a whole form (including code within the form load) to another form, without needing to select every element of that form.

    Thanks for any assistance.
    u mean at design time right?? well not really.. but you can drag and select all items in a form at once and copy them to a blank form... and then just select all the code at once and copy that over 2.. it should be able to be done in 2 copy/paste operations. 1 for the form design and one for the code

  3. #3
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    Copy the form (in your Window environment, not the IDE), rename the copy to the new form name, edit the new form in a simple text editor like NotePad changing any reference of the old name to the new name and, finally, add the new form to your project.

  4. #4
    Frenzied Member John McKernan's Avatar
    Join Date
    Jan 2002
    Location
    SE PA
    Posts
    1,295
    From within the IDE:
    1. Make sure the form has been saved
    2. Change the .Name Property of the form to be copied to the new name.
    3. In the "Project Explorer" right-click on the form to be copied and choose 'Save As..." saving it under a new name.
    4. Add the original form back into the project.

  5. #5
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    Download MZ-Tools a great free add-in for VB that allows you to copy controls with source code. It also has a bunch of other nice features.

  6. #6

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Location
    ottawa, canada
    Posts
    233
    Thanks guys.

    Merry xmas

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