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.
luciliacoelhoAsked:
Who is Participating?
 
pcelbaCommented:
Wait with abandoning please.

Did you download and execute the form attached to my answer http:#26191143 ?

Steps for development version are:
1) Download file astoplevel.SCT.txt
2) Download file astoplevel.SCX.txt
3) Rename astoplevel.SCT.txt  to astoplevel.SCT
4) Rename astoplevel.SCX.txt  to astoplevel.SCX
5) Execute the form   DO FORM astoplevel.SCX

The form works exactly as you described in your post http:#26185597. Or do you still see some 2° window? If yes then please make a Print screen of this window and post it here.
 
To reproduce this behavior in EXE application created in VFP you have to download the third file attached to above answer, create project, and build the EXE.

0
 
pcelbaCommented:
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.
0
 
jrbbldrCommented:
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



0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
luciliacoelhoAuthor Commented:
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
0
 
CaptainCyrilFounder, Software Engineer, Data ScientistCommented:
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
0
 
jrbbldrCommented:
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

0
 
pcelbaCommented:
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...
0
 
pcelbaCommented:
Now I see Captain answered it...
0
 
luciliacoelhoAuthor Commented:
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
0
 
pcelbaCommented:
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
0
 
CaptainCyrilFounder, Software Engineer, Data ScientistCommented:
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.
0
 
luciliacoelhoAuthor Commented:
the problem is that the second window is a VFP window, not a aplication form.
0
 
pcelbaCommented:
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?
0
 
Olaf DoschkeSoftware DeveloperCommented:
@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.
0
 
luciliacoelhoAuthor Commented:
the solutions don´t solv the problem. Probably i don´t explain well. I abandon this problem
0
 
luciliacoelhoAuthor Commented:
thanks. with this detailed steps the problem was solved
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.