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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Two windows appearing on my application 1

Status
Not open for further replies.

namax

Technical User
May 22, 2011
19
PG
I have developed an application and is working well.however I have a problem.and that is when i click on the application icon there are two window appearing.one is my own main form which i have set as main with its own menu items and the other is the default vfpro window.below is my main code that runs the application:

*Main program
SET PATH TO 'C:\census update'
#define db_name "census update"

*set Environment
SET MULTILOCKS ON && Set for table buffering
SET SYSMENU OFF

SET CONSOLE OFF

*opens the database

IF NOT DBUSED(db_name) THEN
OPEN DATABASE db_name SHARED
ENDIF

SET DATABASE TO db_name

DO FORM mainform.scx


READ EVENTS
CLEAR EVENTS

CLEAR ALL
CLOSE ALL
CLOSE DATABASES ALL
RELEASE ALL

I believe there is a way to hide the visual foxpro window and let only my main form to run alone,but i don't know how.could anyone assist me on this.

Thankyou in advance.
 
What you are seeing is perfectly normal. If it's not what you want, follow these steps:

1. Make you main form a top-level form (set its ShowWindow property to 2).

2. Create a config.fpw file (if you haven't already done so), and add this line:

SCREEN = OFF

3. When building the app, be sure to include the above congif.fpw in the project.

That's basically all you need to do. If you are unsure of any of the above details, check the VFP help.

Note that the outer window will still be visible when you are running in the VFP development environment. That's what you want, othewise you wouldn't have access to VFP's own menus and tools.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top