Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Desktop property on the fly
Message
From
04/02/2002 08:28:06
 
 
To
04/02/2002 06:40:26
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00614690
Message ID:
00614732
Views:
28
Maybe you could try this:
LOCAL lcClassDef, ;
	lcTempFile
TEXT TO lcClassDef TEXTMERGE NOSHOW
DEFINE CLASS MyForm AS Form
	*-- Here you can play around with the size.
	WIDTH = 150
	HEIGHT = 100
	AUTOCENTER = .T.
	DESKTOP = .T.
	ADD OBJECT btnInfo AS COMMANDBUTTON WITH ;
			LEFT = 65, ;
			TOP = 20, ;
			WIDTH = 40, ;
			CAPTION = "Info"
	ADD OBJECT btnClose AS COMMANDBUTTON WITH ;
			LEFT = 65, ;
			TOP = 50, ;
			WIDTH = 40, ;
			CAPTION = "Close"
	*
	PROCEDURE btnInfo.CLICK
		WAIT WINDOW "Desktop property: " + TRANSFORM(THISFORM.Desktop)
	ENDPROC
	*
	PROCEDURE btnClose.CLICK
		THISFORM.Release()
	ENDPROC
ENDDEFINE
ENDTEXT
*
lcTempFile = FORCEEXT(SYS(2015), "PRG")
STRTOFILE(lcClassDef, lcTempFile)
*
SET PROCEDURE TO (lcTempFile) ADDITIVE
loMyForm = NEWOBJECT("MyForm")
loMyForm.SHOW(1)
>Hi there,
>I have created a function to browse anything (i.e accounts, items) and return a value. It is a form which is created programmatically and gives users a quick lookup into the account name, and selection by clicking the first characters of this account. The problem I face is that the main calling form is a desktop form and when calling this function I cannot set its desktop property to .T. at runtime. I have tried showwindow and other solutions but the new auto createed form is just hiding somewhere and does not show itself on the screen.
>
>Any ideas.
>
>You are welcome
>
>Jonathan
Christian Isberner
Software Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform