Information générale
Catégorie:
Codage, syntaxe et commandes
>Hello all, I am trying to determine if MapPoint 2002 is still running. In FoxPro I would use the following lines of code.
>
>IF VARTYPE("oMapApp.Visible") <> "L"
> MESSAGEBOX("MapPoint is not running!")
>ENDIF
>
>In VB.NET I tried :
>
>If TypeOf oMapApp.Visible Is Boolean Then
> ...
>End If
>
>But that code gives me an error when MapPoint is not running. What is the proper syntax in VB or VB.NET. Thanks for the help.
>
>Randy Belcher
VarType() existed in VB6, I don't know if it's still present in VB.Net. The same call would work in VB6, but you would check for a return value of 11 (vbBoolean). IOW it returns an integer instead of a string as in VFP.
HTH
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement