COMPILE FORM

ProgID

The Programmatic Identifier (known as ProgID) is the string you pass to CreateObject() or NewObject() to create a COM object. This property tells you what string to use for a particular COM object you're creating. The property is read-only.

Usage

cMyServername = oServer.ProgID
When you create a COM server as part of a VFP Project, the server's name is created in the form "Project.ClassName," where Project is the name of your project and ClassName is the name of the visual class or program that defines the server class. To create an instance of your object, pass this name to CreateObject(). The ProgID displays the name to pass.

You cannot change this name directly. You can change the first half by modifying the server name using the Project's ServerProject property, and the second half by renaming the class library or program that defines the object.

Example

* Ted's project for testing SYS(2335) was called SYS2335 * His test class was a program named Fred.PRG ? oProject.Servers[1].ProgID          && "SYS2335.fred" oDear = CREATEOBJECT("SYS2335.Fred")  && creates the object

See Also

CreateObject(), NewObject(), Project, Server, ServerProject


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net