Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I add a foundation class to my form
Message
From
28/12/2004 11:31:25
 
 
To
28/12/2004 10:42:49
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00972590
Message ID:
00972601
Views:
15
This message has been marked as the solution to the initial question of the thread.
This snippet is how you can do it procedurally:
SET CLASSLIB TO 'C:\PROGRAM FILES\MICROSOFT VISUAL FOXPRO 7\FFC\_CONTROLS.VCX' ADDITIVE

* This works
oFM = CREATEOBJECT( 'myTestForm' )
oFm.AddObject( 'oSize', '_resizable' )
oFM.AddObject( 'oGd', 'grid' )
oFM.oGd.Visible = .T.
oFM.Show(1)

DEFINE CLASS myTestForm As Form 
	PROCEDURE Resize
		IF TYPE( 'this.oSize' ) = 'O' AND NOT ISNULL( this.oSize )
			this.oSize.AdjustControls()
		ENDIF 
	ENDPROC 
ENDDEFINE 
Note that in the form class definition I call the oSize.AdjustControls object whenever the resize method of the form is invoked. Also, the filepath to the _controls.vcx may be different with your installation. The grid is for demonstration purposes only.

>I have read and read the VFP help on adding a foundation class to a form. I want to use the resize class on a form.
>
>Can someone point me in the right direction. I just can't figure out how to add the foundation class to my form or project. I just don't "get it".
>
>Thanks,
>John
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform