On Sun, 10 May 2015, Martin McGlensey wrote: > Hello, > > I have a form (form) that has several controls on it. They are comboboxes, > textboxes and buttons. The comboboxes are initialized in the form open > procedure. > > If I open a new form using "Form1 = New form" and call it from another form > the dropdown list of the comboboxes as well other variables are not > initialized on Form1. This should occur when the form opens but, in the NEW > instance the form open routine appears to be skipped. Of course without the > data contained in the comboboxes the code in the NEW instance fails. > > Is there a way around this? How can I force the new instance (Form1) to > initialize properly? >
It is intended that the form is *not* shown as soon as it is instantiated. If you want to do that, just write Form1 = New form Form1.Show() Or alternatively, if you want to initialise children independent of whether the form is shown or not, you write the initialisation code into the constructor of your "form" class which is the special _new method[0]. Regards, Tobi [0] http://gambaswiki.org/wiki/lang/special/new -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user