Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Listing properties and methods in Activex Controls
Message
 
À
14/06/2000 17:04:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00380460
Message ID:
00380849
Vues:
21
As someone mentioned, you can't always see things in A/X controls until they have been accessed.

I'm not sure if this will help you since you need this at runtime. The class browser (which browses much more than just classes including A/X controls) in VFP comes in an .APP in your VFP program folder. It has an object model you can use to get any info you want. I don't know if it's OK to distribute the BROWSER.APP. I can't find it in the docs. If it is, you still need to be able to find the .OCX on disk for this to work. We use it to pull a little bit of info from our .TLB files to create documentation automatically.


local lcFileName, lcAlias, lnI

lcFileName=getfile("OCX")
if !file(lcFileName)
messagebox("File not selected")
return
endif

create table (lcFileName+".DBF") free (name C(25), descrip m)
lcAlias=alias()

&&This var is already set in the development environment, but not in an .EXE
_BROWSER="C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\VFP98\BROWSER.APP"
DO (_BROWSER) with lcFileName &&call up the object browser

for lnI=1 to alen(_oBrowser.amemberlist,1) &&gleen info from object browser
insert into &lcAlias (name, descrip);
VALUES (_oBrowser.amemberlist[lnI,1], strtran(_oBrowser.amemberlist[lnI,3],chr(13),chr(10)))
endfor

_oBrowser.Release() &&done with the object browser

go top
browse
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform