Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Free Graphing Tool for VFP?
Message
De
28/09/1999 03:03:32
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
28/09/1999 02:41:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00268804
Message ID:
00269801
Vues:
30
>>
>>
Getobject() is interecting in that it depends if it errors on how you use it. I mean there are instances where getobject() doesn't error but doesn't "get" an existing instance too. If you use it properly to get an existing instance then it errors if it doesn't exist (but typically what I really want to). So I do my check of existence and use "getobject" if exists otherwise "createobject". Here is simple logic I use :
>>-Instantiate a variable to hold window handle
>>-Declare dlls to getforegroundwindow and iswindow checks
>>-If type(handle)="N" and iswindow(handle) getobject
>>-Otherwise createobject
>>-When object first activated getforegroundwindow and save windowhandle to variable
>>
>>Cetin
>Thank you, Cetin. You mention items which I did not consider and should. I was only thinking of preventing another instance from starting, let the user know that there is an existing instance and let the user decide to use it or not. I don't know if Getobject() will recognize a COM session started outside the VFP app.
>
>Thanks again.
> Tom Molloy


Tom,
Clarify something here. I didn't mean an instance that's started outside the VFP. It hit me with getobject(), directly from VFP, more than one instance starting in their separate environments as if they were all created with createobject. I'll try to rewrite the code that causes it ASAP.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform