Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to prohibit User to start 2nd time the executable
Message
 
 
À
11/01/2002 03:15:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00603363
Message ID:
00603649
Vues:
16
Petros,

The problem with the code is that your test is finding itself. Here's a better way to do this in your main.prg
lcCaption = "My application" && the real application window caption

_screen.Caption = lcCaption + sys(2015) && temporarily hack the caption

lnHWND = FindWindow( ... lcCaption ... )

if ( lnHWND > 0 )
   return
endif

_screen.Caption = lcCaption && set to the real caption
>I used your code in my main.prg under the command :
>
>MODIFY WINDOW SCREEN TITLE "app caption" ICON FILE XXX.ICO NOCLOSE
>
>and the lnWinHandle = 1928 the first time the i am starting the .exe
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform