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!

can't see form 1

Status
Not open for further replies.

MrDontKnowNothing

Programmer
Jun 26, 2003
94
0
0
DE
hi folks,

i wrote a *.prg wich calls a form like "do form myform with parm".
within foxpro i can execute the *.prog and the form pops up and everthing is fine, but if i compile the *.prog and build an *.exe it doesn't work at all. (i see the form flimmering for a second).

any ideas?

gracias alex
 
open up the form (scx) and change the form property from the properties window.

It's probably set to default - 0 (as in the form only appears in the Visfox screen)

mrf

 
found in the form designer, but still the same result. i see the vfp enviroment popping up for a second and it's gone...

cheers

alex
 
have you got a

READ EVENTS

in your program that launches the form?

mrF
 
My startup program would look something like..

*************
* Main.prg *
*************
CLEAR ALL

SET ESCAPE OFF
SET CPDIALOG OFF
SET RESOURCE off
SET DATE DMY
SET CENTURY on


Application.visible = .f.
DO FORM "frmForm" naME frmForm


Read Events
********************

mrF
 
I have exactly the same problem as reported.
My form is set to main and form.showWindow set to 2 (AS top level form).
What to do ?
Thanks.

This is my startup program

* TRL8_APP.PRG

* This file is a generated, framework-enabling component
* created by APPBUILDER
* (c) Microsoft Corporation


* Framework-generated application startup program
* for D:\TRL8\TRL8 Project

#INCLUDE [..\TRL8_APP.H]

IF TYPE([APP_GLOBAL.Class]) = "C" AND ;
UPPER(APP_GLOBAL.Class) == UPPER(APP_CLASSNAME)
MESSAGEBOX(APP_ALREADY_RUNNING_LOC,48, ;
APP_GLOBAL.cCaption )
IF VARTYPE(APP_GLOBAL.oFrame) = "O"
APP_GLOBAL.oFrame.Show()
ENDIF
RETURN

ENDIF

RELEASE APP_GLOBAL
PUBLIC APP_GLOBAL

LOCAL lcLastSetTalk, llAppRan, lnSeconds, loSplash
LOCAL ARRAY laCheck[1]

lcLastSetTalk=SET("TALK")
loSplash = .NULL.
SET TALK OFF

#IFDEF APP_SPLASHCLASS

IF NOT EMPTY(APP_SPLASHCLASS)
loSplash = NEWOBJECT(APP_SPLASHCLASS, APP_SPLASHCLASSLIB)
IF VARTYPE(loSplash) = "O"
lnSeconds = SECONDS()
loSplash.Show()
ENDIF
ENDIF

#ENDIF

APP_GLOBAL = NEWOBJECT(APP_CLASSNAME, APP_CLASSLIB)

IF VARTYPE(APP_GLOBAL) = "O" ;
AND ACLASS(laCheck,APP_GLOBAL) > 0 AND ;
ASCAN(laCheck,UPPER(APP_SUPERCLASS)) > 0

APP_GLOBAL.cReference =[APP_GLOBAL]
APP_GLOBAL.cFormMediatorName = APP_MEDIATOR_NAME

#IFDEF APP_CD
APP_CD
#ENDIF

#IFDEF APP_PATH
APP_PATH
#ENDIF

#IFDEF APP_INITIALIZE
APP_INITIALIZE
#ENDIF

IF VARTYPE(loSplash) = "O"

IF SECONDS() < lnSeconds + APP_SPLASHDELAY
=INKEY(APP_SPLASHDELAY-(SECONDS()-lnSeconds),&quot;MH&quot;)
ENDIF

loSplash.Release()
loSplash = .NULL.

ENDIF

RELEASE laCheck, loSplash, lnSeconds

IF NOT APP_GLOBAL.Show()

IF TYPE([APP_GLOBAL.Name]) = &quot;C&quot;
MESSAGEBOX(APP_CANNOT_RUN_LOC,16, ;
APP_GLOBAL.cCaption )
APP_GLOBAL.Release()
ELSE
MESSAGEBOX(APP_CANNOT_RUN_LOC,16)
ENDIF

ELSE
llAppRan = .T.
ENDIF


IF TYPE([APP_GLOBAL.lReadEvents]) = &quot;L&quot;

IF APP_GLOBAL.lReadEvents
* the Release() method was not used
* but we've somehow gotten out of READ EVENTS...
APP_GLOBAL.Release()
ENDIF
ELSE
RELEASE APP_GLOBAL
ENDIF

ELSE

MESSAGEBOX(APP_WRONG_SUPERCLASS_LOC,16)
RELEASE APP_GLOBAL

ENDIF

IF lcLastSetTalk==&quot;ON&quot;
SET TALK ON
ELSE
SET TALK OFF
ENDIF

IF TYPE([APP_GLOBAL]) = &quot;O&quot;
* non-read events app
RETURN APP_GLOBAL
ELSE
RETURN llAppRan
ENDIF

 
i had the same problem. what i did was i put READ EVENTS in the form's ACTIVATE event then issued CLEAR EVENTS in the form's RELEASE event.


kilroy [trooper]
philippines
&quot;and that's what we call creativity...&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top