PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: ? on creating forms & loading combo boxes  (Read 363 times)

Paul D. Elliott

  • Guest
? on creating forms & loading combo boxes
« on: July 07, 2004, 02:55:19 PM »

Is it possible to create all the forms that a program has  at the very
beginning of the program? The reason I ask is I'm working on a program
that has around 5-10 combo boxes on various tabs. the users will be
going through the tabs many times during the day ( not always in the
same order .. it is under program control and depends on what they
want to do at the time ) and it would seem to me to be quicker to just
load them all up when the program starts. I would not have to wait for
them to load each time the form is shown. Then I could kill all the forms
at once when the program is exited.

Any thoughts?

Thanks.
Logged

Roger Garstang

  • Guest
? on creating forms & loading combo boxes
« Reply #1 on: July 07, 2004, 04:12:52 PM »

Well, at first I was going to say to turn the visible style of the window off, but the formname_Show function still shows the window...perhaps trying in the WM_Create or one of the Activate messages to set the visibility style?  Then set it to visible when the form is needing to be shown.  This may be a wishlist item as the visible style has no effect the way the form is currently shown.

Show function needs an option for how to show- SW_HIDE, SW_SHOW, etc.  Or perhaps another function that creates the form, and formname_Show only shows the form and handles the modal stuff.
Logged

Roger Garstang

  • Guest
? on creating forms & loading combo boxes
« Reply #2 on: July 12, 2004, 02:22:44 AM »

I just looked at the FF generated code again and it appears tab controls already preload all of their forms when they load the handles in each of the tabs to what child is to be displayed...so you should be ok.

I've also made a suggestion to Paul on how to really make this work well and add more options to the properties tab on forms and have more WindowStates.  That way calling [formname]_Show would show it in the WindowState selected and if Hidden was a state "preloading" would be a snap.  This should be a lot easier than DDT.
Logged

Paul D. Elliott

  • Guest
? on creating forms & loading combo boxes
« Reply #3 on: July 12, 2004, 02:50:42 PM »

Thanks. That means that I can load up all my combo boxes at program
startup. Which is good considering that I can't find how to associate a
table with a combo box as in plain PowerBasic.
Logged

Roger Garstang

  • Guest
? on creating forms & loading combo boxes
« Reply #4 on: July 12, 2004, 02:54:02 PM »

Yup load them up in WM_CREATE of the form they are in.
Logged