Link to home
Start Free TrialLog in
Avatar of luciliacoelho
luciliacoelhoFlag for Portugal

asked on

when i execute a VFP project with extension exe one 2º window appear

when i execute a VFP project with extension exe one 2º window appear behind the principal window.
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

What means " one 2º window " ? Could you post some printscreen?

If it is the main Visual FoxPro window which you don't need in your app then you may add
SCREEN = OFF
into the app CONFIG.FPW  file.
Same behavior is obtained when you add
_screen. Visible = .F.
command into your code.

If you need the main VFP window in your app (due to the main menu definition etc.) then you have to tell more.
Avatar of jrbbldr
jrbbldr

IF I interpret your statement  " one 2º window "  correctly, it could possibly be a DOS window temporarily opening due to a RUN command within your VFP application.

If you are the developer, you can launch your application's PRG file(s) within the VFP TRACE window and step through the code to find when this issue appears.

Give us more clarity on your issue and we can possibly assist you better.

Good Luck



Avatar of luciliacoelho

ASKER

If i put the instrution
_screen. Visible = .F.
in my cod, the aplication screen don´t appear.
this solution don´t solve my problem. I attach the situation if it helps
screens.pdf
You should make your first window:
ShowWindow = 2 && Stand Alone Window

Put a file config.fpw inside the same folder as the exe and in it put
SCREEN=OFF
OK, your 2nd window is not a DOS window (a bad assumption on my part), but instead it is the main VFP screen/window within which your application's Form is displaying - quite a normal situation.

Follow CaptainCyril's advice to change this.

Good Luck

If you place  _screen.Visible = .f.  to the Form Init or Form Load then nothing is visible which is correct.

If you set Form's ShowWindow property to 2 (As Top-level form) the this single form (and all forms created within it) will be visible.

Don't forget to place _screen.Visible = .T.  in form Release or Unload method otherwise you don't see your development environment any more...
Now I see Captain answered it...
i think i didn´t explain very well, because you don´t understand what happen. I didn´t creat the background window, it appears when i execute the project exe. The main form is TOP LEVEL
It seems the Form No 1 is "In Top Level Form" not "As Top Level Form" otherwise it cannot disappear when you disable _screen visibility.

Are you able to create EXE from following three files? If yes, then look what's wrong on your form or please post screen shot.
AsTopLevel.prg.txt
astoplevel.SCT.txt
astoplevel.scx.txt
You have something In Screen or In Top Level Form that is disappearing when you hide the Main FoxPro Window. There is no other explanation.
the problem is that the second window is a VFP window, not a aplication form.
Yes, we know.

_screen.Visible = .f.   must help if the 1st form has ShowWindow = 2  (As Top level form)

BTW, did you try my form?
@luciliacoelho: In fct you have all the answers you need. Check the ShowWindow property of your main form, this must be 2 - As Top Level Form, then compile again, changing it does not change the EXE, you need to recompile. The EXE is not another form of the project or part of it, it's the compiled version of your application, the end product of all our programming.

This Tek-Tips FAQ should help you create a sample project with a top level form. Take a look at the main form and it's non-dafault valued properties.

http://www.tek-tips.com/faqs.cfm?fid=6512

Bye, Olaf.
the solutions don´t solv the problem. Probably i don´t explain well. I abandon this problem
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks. with this detailed steps the problem was solved