?
Solved

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

Posted on 2010-01-05
16
Medium Priority
?
551 Views
Last Modified: 2012-05-08
when i execute a VFP project with extension exe one 2º window appear behind the principal window.
0
Comment
Question by:luciliacoelho
  • 6
  • 5
  • 2
  • +2
16 Comments
 
LVL 43

Expert Comment

by:pcelba
ID: 26184108
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
 
LVL 12

Expert Comment

by:jrbbldr
ID: 26184734
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
 

Author Comment

by:luciliacoelho
ID: 26185597
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 27

Expert Comment

by:CaptainCyril
ID: 26185962
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
 
LVL 12

Expert Comment

by:jrbbldr
ID: 26187295
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
 
LVL 43

Expert Comment

by:pcelba
ID: 26188698
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
 
LVL 43

Expert Comment

by:pcelba
ID: 26188741
Now I see Captain answered it...
0
 

Author Comment

by:luciliacoelho
ID: 26190758
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
 
LVL 43

Expert Comment

by:pcelba
ID: 26191143
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
 
LVL 27

Expert Comment

by:CaptainCyril
ID: 26191174
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
 

Author Comment

by:luciliacoelho
ID: 26191458
the problem is that the second window is a VFP window, not a aplication form.
0
 
LVL 43

Expert Comment

by:pcelba
ID: 26191559
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
 
LVL 30

Expert Comment

by:Olaf Doschke
ID: 26208010
@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
 

Author Comment

by:luciliacoelho
ID: 26448152
the solutions don´t solv the problem. Probably i don´t explain well. I abandon this problem
0
 
LVL 43

Accepted Solution

by:
pcelba earned 2000 total points
ID: 26448611
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
 

Author Closing Comment

by:luciliacoelho
ID: 31673134
thanks. with this detailed steps the problem was solved
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
Welcome back to our beginners guide of the popular Unix tool, cron. If you missed part one where we introduced this tool, the link is below. We left off learning how to build a simple script to schedule automatic back ups. Now, we’ll learn how to se…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
There may be issues when you are trying to access Outlook or send & receive emails or due to Outlook crash which leads to corrupt or damaged PST file. To eliminate the corruption from your PST file, you need to repair the corrupt Outlook PST file. U…
Suggested Courses

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question