Inherited forms: lost controls :(

I have a base form A that has just the basic Accept and Cancel buttons, and some coded functionality for data base apps. When in the designer I create a new form B and by code I specify it inherits from A, visually I can see the two buttons coming from the base form, with the usual lock icons. My problem is when I run for the first time the program, in run-time the buttons disappear; when I go back to the child form using the designer, buttons are just gone....
What’s wrong is it a bug
If any one can help, I can send you required files.

Thank you,
Guillermo





Answer this question

Inherited forms: lost controls :(

  • Ed Hintz

    Hi,

    If you wish I can send you my project and indications about the parent and child forms; its kind of simple. Includes a small database though. My mail is guillermo@gnsis.net so you can give me your mail.

    Thanx,

    Guillermo


  • davemord

    Try giving the 'inherits' statement a fully qualified syntax.

    Re-build, and see if that helps.

    Public Class Form2

    Inherits WindowsApplication1.Form1

    End Class



  • SAD1

    Maybe I'm doing it different than you, but I don't get

    any disappearing buttons.

    I do have trouble getting the 'inherits' statement on form2 to work.

    I have to change the syntax back and forth a couple of times

    to get rid of an error message.

    I am testing with just 1 button on form1 which gets 'picked up'

    into form2. I added nothing directly to form2 in the designer.

    I did resize form2 in the designer and the locked 'carry over'

    button still appears in the IDE and when I run the program.

    No idea why it is working different for you.



  • Tammt

    Hi,

    I think I found the problem; the base form has a size of 300 by 300. If I keep this size in the child (inherited) form, the windows works and looks ok with the base form's buttons. If I change the child form size in design time, buttons are still there... but as art of magic , if just after that I build and run the app., buttons in the child form disapear !!! in design and run-time

    Is it normal is it a bug

    Guillermo


  • _JJ

    Click on my name in the post to find my e-mail.

    I'll try to look at it if it comes through okay.

    (I am not a VB guru my any means, but I like learning

    by trying to solve these type problems. Until the wife

    pulls the plug on the PC anyway!)



  • Inherited forms: lost controls :(