Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Distributing applications 2

Status
Not open for further replies.

albewar

Technical User
Mar 30, 2002
10
0
0
AR
Hello :)

I´ve developed my first application consisting in two forms in one pageframe, and two tables.
Now I wish to run this application on a single machine without VFP installed on it.
Following the VFP9 help (God!) I´ve built an exe file and it was created well but when I execute the exe file, the proyect appear for a fraction of a second and dissapear.
I´ve enclosed .dll required in the same directory where the exe file resides, but it does not work.
I don´t understand where to place the READ EVENTS and CLEAR EVENTS if needed.
Is there some kind of checking list or sample to solve this?

Kind regards,

Alberto
Buenos Aires
 
Do the following:
Code:
Create Project MyApp
Then, add your forms to the project.
Then, create a program file called MyAppMain.prg containing this:
Code:
Do Form MyForm1
Read Events
(Obviously replace the name of the Form with the correct name).
Then, right click on the icon for MyAppMain.prg in your project and tick 'Set Main'.
The result is:
When you launch your application, MyAppMain.prg runs, opens and shows the form and hits Read Events.
Now, where to put the Clear Events? Answer typically is in the Release method of MyForm1, so that, when the form is closed (by whatever means) the Clear Events will trigger, control returns to MyAppMain.prg, which now ends and exits.
You're right, it isn't obvious. But it is flexible ;-)

Yes, there is a sample - it should be in
Code:
C:\Program Files\Microsoft Visual FoxPro 9\Samples\
and there should be a Tastrade and/or Northwind sample application. On my installation however there are only data tables for these apps. There is however a
Code:
C:\Program Files\Microsoft Visual FoxPro 9\Samples\Solution\solution.pjx

When you open an example application project, look for the file whose name is in bold print, and that is the starting point (the 'Main' file') for the project.
 
Hello,

Thanks a lot!

I´ll follow the tips and report to you.

Cheers!

Alberto
 
Hello again and thank to ChrisCarroll for the help.

Now, when I´ve built the exe, It ran automatically the application mataining the develop form sizes and everithing look well.
But when I run the exe alone (out of the VFP environment) the window is showed trimmed and part of the form cannot be accesed or even scrolled. I tried to resize the forms, and all the containes object but it still appening a fixed window the is smaller than the application itself.

The second problem I have is that the VFP command bar with "File, Edit, Window and Help" is showed along with "Microsoft Visual foxpro" in the top of the window. How could I control the visual look of my application?

Kind regards,

Alberto
 
When you run the exe file it does not know to expand to the full width and height. If you use an icon to launch it then RIGHT CLICK on the icon and choose PROPERTIES. In the properties there is RUN comob box. Choose MAXIMIZED.

Rerun the exe file.

As far as the menu you will need to create a menu of your own and call it before your form is called. If you do not need a menu then set sysmenu command is required.

The Title Bar text is simple. Before you call the form or menu have a line of code similar to this:(remove my stuff of course).


MODIFY WINDOW SCREEN TITLE "Crew Chief Pro Drag Racing Systems - Questions? (309) 688-2990 Version Number "+ ALLTRIM(versionno)


Don Higgins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top