Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hiding the main Foxpro window
Message
 
To
14/12/2003 17:12:36
Paul Trimming
Lonely Pilgrim Shareware
Merstham, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00859003
Message ID:
00859006
Views:
44
This message has been marked as the solution to the initial question of the thread.
Hi Paul,

Save the code below in PRG file. Create new project and add this file. Build executable from the project.
_SCREEN.Visible=.F.

LOCAL oParent
oParent = CreateObject('Tparent')
oParent.Visible = .T.
READ EVENTS
* end of main

DEFINE CLASS Tparent As Form
	Width=500
	Height=250
	ShowWindow=2
	Caption='Main form'
	Autocenter=.T.
	
	ADD OBJECT cmd As CommandButton WITH;
	Left=190, Top=200, Width=120, Height=27, Caption='Child form'

PROCEDURE cmd.Click
	LOCAL oChild
	oChild = CreateObject('Tchild')
	oChild.Show(1)

PROCEDURE Destroy
	CLEAR EVENTS
ENDDEFINE

DEFINE CLASS Tchild As Form
	Width=250
	Height=120
	ShowWindow=1
	Caption='Child form'
	Autocenter=.T.

	ADD OBJECT cmd As CommandButton WITH;
	Left=85, Top=80, Width=80, Height=27, Caption='Close'

PROCEDURE cmd.Click
	ThisForm.Release
ENDDEFINE
For demonstration purposes I used classes defined in PRG code. Better use Form designer. Create parent form and child forms. Call child forms not through CreateObject, use DO FORM instead.
Previous
Reply
Map
View

Click here to load this message in the networking platform