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!

VFP7 exe file problem

Status
Not open for further replies.

thawatwong

Instructor
Aug 25, 2002
38
0
0
HK
Hi all,
My project compose of 1 form(mainf.scx) and one .prg file contain this code:
SET DEFAULT TO f:\temp\test
SET PATH TO f:\temp\test\forms;f:\temp\test\progs;
_screen.Visible=.f.
SET SYSMENU OFF
DO FORM mainf
READ EVENTS
And in the form, I created a button store this code in click event:
CLEAR EVENTS
thisform.Release
After I build exe file(store in f:\temp\test\test.exe),when I run an exe file I didn't see anything.Help please.Thank for all response.
thawatwong@msu.ac.th
 
thawatwong

A couple of things I noticed:
[ol][li]_screen.Visible=.f.
Move this to the init of the form.[/li]
[li]You didn't mention if you are using a project.[/li]
[li]Make your form ShowWinfow property = 2[/li][/lo]
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Hi Thawatwong,

Set property of your
MainForm.WIndowState=2

And that is your problem :)


ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
Merry Christmas & Happy New Year [bigears] [party] [2thumbsup]

 
Dear Mike,Ramani
thank you very much for your response,this problem was solved,but I've the other question.yes I created the project using its(vfp7) wizard,that it created me all subdirectory and some .prg files, include some classes.If I create my main.prg
(Vfp wizard created and set main app_main already) and changed to set my main.prg is the mainprogram before build,
I've got an error message after build exe file and can not run myapplication.so I try to build again (deleted my main.prg) and set app_main is the mainprogram. rebuild again,Bingo.
It's work.But It give me a menu, toolbars and quickstart dialog
that I can not control my application.Could you tell me how can I edit these file(that wizard generated).Thanks again
 
thawatwong

that I can not control my application.Could you tell me how can I edit these file(that wizard generated).Thanks again

You cannot be mixing things up too much.
[ol][li]If you are going to use the wizard to create you project, then in order to remove "user login" and quick start etc... Right mouse on the project manager and select builder. You will see on the first page the for "possible" choice of settings you have for those. You might also want to explore the other tabs of the builder to familiarize yourself with what else can be done (changed). But the wizard generated a main program and it is intrinsically required for most of the components of your project. Changing it causes errors.[/li]
[li]If are are not going to use the wizard, then all the work is yours, but you cannot you a bit of the wizard and then trying to take over half way.[/li][/ol]


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Thank you Mike,
I unchecked all,but I want myform start up when program run.I can't solve this problem.Do you have any suggestion?
 
thawatwong

Like I suggested in an earlier post. You have built your project with the wizard and the "normal" behavior of the wizard is not to load a form at startup. But you seem to want that, so my suggestion is to bypass everything that the wizard created for you and call your form directly on startup. You may find that that may cause you some problems in the futur. Create a new start up program (call it main), set it to main (in the project manager right-mouse on it and "set main"). It in put (But this is very basic, you will find you will need a lot more things in there to make this work properly).
Code:
DO FORM myForm.scx
READ EVENTS
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top