Wiki Home

VFP Class Designer

Namespace: WIN_COM_API
You use the VFP Class Designer to visually create and maintain VFP VisualClasses. Visual classes are stored in a file with a .VCX extension, and these files are otherwise valid .DBF file structures, so they are imminently hackable.
Invoke the class designer from the command window like this:

Take note of the NOWAIT clause on the MODIFY CLASS command which means you can invoke the class designer programmatically. Like this:
*-- Programmatically control the class designer
ASELOBJ( xx, 1)
xx[1].BackColor= RGB(255,0,0)
xx[1].Height= 200
xx[1].Width= 200
KEYBOARD '{Ctrl+w}'

A class being edited in the class designer is instantiated as an object, therefore you can set its properties and call its methods just like any object created with New Object(). The one difference is: when the class designer instantiates a class, events don't call their EventHandler (init, click, got focus...). You can call them yourself though. The trick is to get an object reference; use aSelObj() and sys(1270). -- Carl Karsten
If you hack a .VCX and thereafter it looks dodgy in the class designer, don't panic. Just COMPILE CLASSLIB ClassFile to resynchronize the VCX binary fields which the visual class designer relies on to some degree.
The class designer (or VFP) has a bug. If you call modi class from a modal form and try to use CTRL-F to find an expression the class is immediately closed. -- Michael GEmmons
See VFP Form Designer, VFP Vcx Structure
Category VFP Ide
( Topic last updated: 2005.02.11 04:01:24 AM )