Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grab Basket of questions
Message
De
16/03/2016 13:16:02
 
 
À
14/03/2016 23:34:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01633086
Message ID:
01633185
Vues:
58
Hi John,

Regarding # 1, this is what I use to check for other windows with the same title.
cSearchFor = UPPER(ALLTRIM( "YourMainWindowCaption" ))
nHWnd = GetDesktopWindow()	&& API
nHWnd = GetWindow(nHWnd, 5) && API - Get first child window
nNext = 2
lFound = .F.
cTitleBar = ""
do while NOT lFound
  if NOT EMPTY(nHWnd)
    cTitleBar = SPACE(200) + CHR(0)
    nTextLen = GetWindowText(nHWnd, @cTitleBar, 200)  && API
    cTitleBar = UPPER(LEFT(cTitleBar, nTextLen))
 	lFound = (cTitleBar = cSearchFor) 
    if NOT lFound
      nHWnd = GetWindow(nHWnd, nNext)	&& API
    endif
  else
    lFound = .T.
  endif
enddo

return (lFound)
The API call declarations are all that you'll need to get that working, but they're easy to find on news2news.

Regarding # 4: I use a launcher application to drop the main executable to the users temp folder and launch it from there. If the executable is large, this could take a moment or two. To remedy that, I only invoke the copy if the exe isn't already there or it's has a different date/time stamp than the network version. As a side benefit, you never have to kick anyone out to update the network executable. By running it form the local drive, the network instance is never the one that's running.

Hope that helps!
~Erik Folley
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform