duplicate a form

Discussion in 'Questions (Windows Mobile)' started by claveriel, Jun 17, 2007.

  1. claveriel

    claveriel Member

    hello

    how to duplicate a form (and all controls on it) ?
     
  2. RandomCoder

    RandomCoder Well-Known Member Licensed User

    I'm presuming that this is a Form you've designed using the GUI and now want to recreate another Form exactly the same but without all the effort of manually setting the controls again?
    You could open the B4PPC file using notepad or other text editor and copy then paste all the sections of code relating to the Form you want to recreate.
    Bear in mind that you will need to change the Form and Control names to be unique.

    Regards,
    RandomCoder
     
  3. claveriel

    claveriel Member

    thank you RandomCoder

    Ok it's good.


    Regards
     
  4. manu

    manu Active Member Licensed User

    Ok Randomcoder.

    it's very, very good
     
  5. yildi

    yildi Member Licensed User

    I have tried this strategy but I get now an error when I try to open the modified Form in the designer. It tells me: (In French) "The reference to the object is not defined to an instance of the object"

    I have just duplicated a panel and its contents and changed all names in order to assure that they are unique. But I see a lot of blank lines and numbers in the SBP file. I do not know if I must change some of these elements to signal to the editor that I have added new lines...

    I will have to do it in a less lazy way, it seems... :-(

    Regards,
    Murat
     
  6. RandomCoder

    RandomCoder Well-Known Member Licensed User

    I see this behaviour too.
    A possible work-a-round is to create the Forms using the IDE but then add the controls using a txt file that can be copied from the original .sbp
    But remember that all controls must have their own unique name for this to work.

    Regards,
    RandomCoder
     
Loading...