Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLE common dialog
Message
De
27/01/2021 10:35:20
 
 
À
26/01/2021 15:10:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01677921
Message ID:
01677927
Vues:
49
As a follow-up, I ended up adding some code that searched through all open forms and tested for the existence of the OLE object that might be attached to the form. That is, when I used the OLE object, I would add it to the form at run time if needed and thankfully, I added it as a property with the same name each time.
IF PEMSTATUS(loForm,"ioGetFilesDialog",5) = .T.
    SET ESCAPE OFF
    KEYBOARD "{ESC}"
ENDIF
I first tried using .RemoveObject() to nuke the object but I guess that does not work if the object is in use. There also was no .Release() method to somehow get it to release itself. So that's why I ended up with KEYBOARDing ESC as that closes the screen. It is kinda kludgy but since this is part of a shutdown routine, it does not matter that much.

Thanks,
Albert



>>Hi all,
>>
>>Ran across some really old code only used in one spot in an app - it was a wrapper class that it looks like I created in 2003 using ideas, it seems, from Stonefield.
>>
>>It is a wrapper to Microsoft common dialog control version 6. I copied in the constants from the original article/sample or whatever it was but now can't find the original article. It might have also come as part of some Stonefield product.
>>
>>Anyhow, have traced down an error in the app that if the user leaves this dialog up and running (why, I do not know) at night when the system is trying to do a forced shutdown (so that maintenance can be done), that the app is not able to close.
>>
>>First thought was to try to see if there was a flag that could be set to timeout on the dialog but a) have not found a .h file to go with the control and b) any searches for similar MS dialogs do not seem to have a flag anyhow.
>>
>>So first question would be, any idea if dialogs from MSFT have timeout capability?
>>
>>Secondly, if not, how can I programmatically tell if the dialog is open and how do I kill it? The built-in standard shutdown routine shuts down all open forms but this is not a form - maybe I have to call an api in Windows to tell me the topmost form and then figure out if it is a vfp form or ??? just thinking out loud here...
>>
>>Albert
>
>Could this be the article you were thinking of? https://doughennig.com/Papers/Pub/Mar97.pdf
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform