PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: George Bleck on August 28, 2013, 10:53:06 PM

Title: How to do Multiform structuring
Post by: George Bleck on August 28, 2013, 10:53:06 PM
An application I am working on will require a log on to authenticate the user BEFORE DISPLAYING the main interaction form.  Conceptually I thought... Make the log on form the start-up form and then have it call the main interaction form.  This fails.  It appears that as soon as I exit the start-up form the whole app exits.  Am I missing something?

If not, then I see three options to handle this...

Did I miss another method?  What would others do?

Title: Re: How to do Multiform structuring
Post by: Carl Oligny on August 29, 2013, 02:06:24 AM
I used your first method. Put a post message in the main form create section and then did the hide in the custom section.
I originally tried your 3rd method, but my main form has numerous tabs and child forms. Method 1 provided a faster display of an initial form for the user.
Function FRMTBMAIN_WM_CREATE (...
    ...some code
    PostMessage hWndForm, %WM_FORM_CREATE_COMPLETE, 0, 0

END FUNCTION

Function FRMTBMAIN_CUSTOM (...
Select Case %WMSG
      Case %WM_FORM_CREATE_COMPLETE
           FF_Control_ShowState(HWND_FRMLOGON, %SW_HIDE )

END FUNCTION

Create complete is a user equate - %WM_FORM_CREATE_COMPLETE = %WM_USER + 1000
Title: Re: How to do Multiform structuring
Post by: Rolf Brandt on August 29, 2013, 03:14:41 AM
I use #3 - I start the main form and display a login form. The user has the option to use a proper login (user name and password) or exit the application.

Rolf
Title: Re: How to do Multiform structuring
Post by: Paul Squires on August 29, 2013, 08:47:52 AM
I remember this type of scenario being discussed several times in this forum over the years. I would tend towards option #3.