Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I add a foundation class to my form
Message
De
28/12/2004 11:31:25
 
 
À
28/12/2004 10:42:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
00972590
Message ID:
00972601
Vues:
14
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform