Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Screen bitmap dissapears when using api calls
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Screen bitmap dissapears when using api calls
Divers
Thread ID:
00435088
Message ID:
00435088
Vues:
32
I have an app to which I added George Tasker's is_run32 function yesterday to determine if a copy of the program was already running. If a copy of the program is found to already be running, I use the window handle returned from the function, and use 2 more api calls I found in another of George's solutions from a thread I tracked down.

The issue I've run into is that when I use the following code to maximize the already running copy of the application, and bring it to the front, the screen bitmap for the application doesn't show unless there is a form loaded into the screen. I just get a white screened window with the proper menu bar. If I then use a menu to bring up a form, the bitmap magically shows back up.

lnhWnd = is_run32("'Application title'")
if lnhWnd != 0 then
declare integer ShowWindow in WIN32API integer, integer
#define SW_RESTORE 9
ShowWindow( lnHWND, SW_RESTORE )
DECLARE INTEGER SetForegroundWindow IN WIN32API INTEGER
setforegroundwindow(lnhWnd)
quit
endif


Is there some kind of api call I can do to make sure that the screen bitmap shows as viaible when the above code is run?

Any ideas/solutions will be entertained,

JE
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform