PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Richard Marchessault on November 12, 2009, 10:33:01 PM

Title: Startup Behavior
Post by: Richard Marchessault on November 12, 2009, 10:33:01 PM
The opening window for my application is displayed in the center of the screen, unmaximized. If I compile and execute the opening screen comes up maximized. If I then quit the program, return to FF3, and run the executable, the opening window displays as expected. I've done this several times and it repeats.
Title: Re: Startup Behavior
Post by: Paul Squires on November 13, 2009, 08:55:46 AM
Not sure why you would see that behaviour. Are the properties for your main form set to:

StartupPosition: 1 - Centered
WindowState: 0 - Normal

Do you have any code in the WM_CREATE of the main form that changes the size?

When FF3 compiles and runs your program, all it does is a simple ShellExecute api call with the %SW_SHOWNORMAL flag set. Maybe I should just use %SW_SHOW instead.

Richard - I will email you a changed FF3 program to see if such a small change fixes your problem. It will be a couple of hours before you get the new exe in your email.
Title: Re: Startup Behavior
Post by: Richard Marchessault on November 13, 2009, 09:51:06 AM
Thanks. No rush since I won't be able to do any testing until this evening at the earliest.
Title: Re: Startup Behavior
Post by: Richard Marchessault on November 13, 2009, 07:59:38 PM
Downloaded, extracted and setup the modified program. About shows it to be version 3.03.

Behavior is still the same. Screen appears maximized when executed right after compile but centered in the window when the executable is run later.

A bit more about what is happening. The main form is setup to come up maximized. Before the main form is displayed, a splash screen is displayed. It is this splash screen that is coming up maximized. I checked the form properties for the splash screen and they are as you indicated above.

Strange. Never happened with FF2.
Title: Re: Startup Behavior
Post by: Paul Squires on November 13, 2009, 08:01:35 PM
How are you displaying the Splash screen prior to showing the Main form?
Title: Re: Startup Behavior
Post by: Richard Marchessault on November 13, 2009, 08:28:26 PM
In the WM_CREATE section of the main form is this statement.

LL = SharewareForm_Show (HWND_MAINFORM, %TRUE)

Title: Re: Startup Behavior
Post by: Richard Marchessault on November 13, 2009, 10:45:25 PM
Okay now this is really weird. FF3 compiles okay (Ctrl-F5). Running the executable after the compile works fine (Shift-F5). However, complile and excute (F5), compiles okay but when it goes to execute it runs an old VB version of my application that is still on my hard drive.

The old VB program is in the folder C:\LEAGASST\ and is named LeagueAssistant.exe

The compiled FF program is actually in a subfolder in MyDocuments. It has the same name of LeagueAssistant.exe

The old VB program started with the splash screen maximized. The FF program does not maximize the splash screen. I was not expecting to see the old program load which is what made me think the FF program was starting up with a maximized splash screen.

Any idea why the wrong program is loading after the compile?
Title: Re: Startup Behavior
Post by: Rolf Brandt on November 14, 2009, 04:43:39 AM
Maybe you should check your environment vars. Could be that you have that folder "C:\LEAGASST\" in it.

Rolf
Title: Re: Startup Behavior
Post by: Richard Marchessault on November 14, 2009, 08:31:05 AM
I checked all through the environment settings and through my program code. Nothing refers to the folder with my old VB program. Since one thing that is certain is that the name of the old and new executable files are the same, I'm going to experiment with changing the name of the new executable and see what happens.
Title: Re: Startup Behavior
Post by: Rolf Brandt on November 14, 2009, 08:42:29 AM
Changing the name certainly should solve the problem.

Just to make sure, when I spoke of environment settings I meant the Windows environment var (the one you get by typing "Path" in a command window, not the FireFly environment.

Rolf
Title: Re: Startup Behavior
Post by: Richard Marchessault on November 14, 2009, 08:51:45 AM
I checked that path just now. It does not include the folder with the old VB program.
Title: Re: Startup Behavior
Post by: Rolf Brandt on November 14, 2009, 08:54:28 AM
Then this is indeed a very strange behavior.
Title: Re: Startup Behavior
Post by: Richard Marchessault on November 14, 2009, 09:03:12 AM
I changed the name of the project and now compile and execute are working as they should. That is great but I still think there is a bug in FF that needs to be fixed.