Stringtable

Started by Gian Kolbjornsen, August 13, 2004, 11:38:08 AM

Previous topic - Next topic

Gian Kolbjornsen

Hi all,

I have a couple of easy questions:

1. I have an app with a tray icon and I want it to start with the main window hidden. I have tried SHOWWINDOW hWndForm, %SW_HIDE
but it does not do anything.

2. How would I add resources like a stringtable to a FF project?

Thanks,

Gian

TechSupport

Quote from: Gian Kolbjornsen
2. How would I add resources like a stringtable to a FF project?

Under the "Project" menu, select "Add Resource Module". Just add your string table there. The code will be merged with FireFly's own resource file whenever you compile your project.

TechSupport

Quote from: Gian KolbjornsenHi all,

I have a couple of easy questions:

1. I have an app with a tray icon and I want it to start with the main window hidden. I have tried SHOWWINDOW hWndForm, %SW_HIDE
but it does not do anything.


This one is not as easy.... :)

The current version of FireFly will always display the Form designated as the Startup Form (found under "Project", "Project Properties"). This is the case even if the window's visible style has initially been unchecked in the property list. I need to modify FireFly to honor this setting.

The easiest fix is to continue developing your program as normal. Before you go to release the final version, you can manually edit the source to change the ShowWindow function from %SW_SHOWNORMAL to %SW_HIDE.

The ShowWindow function will be in the FireFly generated code for the "MAIN" source file. For example, "Project1_Main.bas".

The function is located right before a call to UpdateWindow and immediately before the message pump.

The second method works but will still result in an initial flash of the startup Form on the screen before it is hidden. It involves defining a user message and using PostMessage in the main Form's WM_CREATE message. You would respond to the user message from within the CUSTOM message of the Form. If you want to go this way then let me know and I will explain in greater detail.

Gian Kolbjornsen

Thanks for the reply Paul.

So the startup for has to be loaded all the time ... or the app terminates, right?

I would like you to consider to things in that regard:

1. It would be nice to have a startup function as an option to a form. That would like in VB where you select a sub main as startup procedure and when the procedure ends the app terminates.

2. It would be nice to be able to generate many instances of a form. Imagine making a messenger and you would like to generate a window for each incomming call. Is it possible?

I am getting close to finalizing my first major comercial product made in FF. It is looking very good and FF is a great tool!

Thanks,

Gian