Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Close Open Windows Issue
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01446887
Message ID:
01447089
Vues:
36
Hi Kirk,

as _screen.forms give you an array, you will have to change your VARTYPE() clause from
IF VARTYPE(_screen.Forms) = [O]
to
IF VARTYPE(_screen.Forms(i)) = [O]
>I'm having a minor issue with the following routine to close any open windows when my application does an auto shutdown due in inactivity. I'm not sure why this is, but I keep gettings FORMS is not an object in my error log. The application does close any open dialogs, but with 50 users, the log is getting filled up with this error message.
>
>Thanks for any help.
>
>
>local lnForms, i
>lnForms = _screen.formcount
>SET MESSAGE TO [Closing Dialogs...]
>IF lnForms > 0
>	FOR i = lnForms to 1 STEP -1
>		IF VARTYPE(_screen.Forms)=[O]                                                      << FORMS is not an object
>			SET MESSAGE TO [Closing Dialog: ]+_screen.Forms(i).Name    << FORMS is not an object
>			_screen.Forms(i).Release                                                          << FORMS is not an object
>		ENDIF 
>	ENDFOR
>ENDIF 
>
Best Regards
-Tom

Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.

Oh, and BTW: 010101100100011001010000011110000101001001101111011000110110101101110011
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform