Lancer exe en transparent avec en paramètre un fichier ini
ladylazy23
Messages postés11Date d'inscriptionjeudi 28 décembre 2000StatutMembreDernière intervention31 août 2009
-
24 avril 2009 à 14:56
ladylazy23
Messages postés11Date d'inscriptionjeudi 28 décembre 2000StatutMembreDernière intervention31 août 2009
-
24 avril 2009 à 17:22
Bonjour,
Je voulais savoir s'il était possible de lancer une application en transparent sachant qu'elle est associée à un fichier ini.
J'ai essayé de lancer l'application de la façon suivante :
pid2 = (Shell("Mon_appli.exe, vbNormalNoFocus))
handappli = InstanceToWnd(pid2)
SetWindowLong handappli, GWL_EXSTYLE, GetWindowLong(handappli, GWL_EXSTYLE) Or WS_EX_LAYERED
SetLayeredWindowAttributes handappli, 0, 125, LWA_ALPHA
L'application est bien lancée en transparent.
Mais par contre quand je fais ceci :
pid2 = (Shell("Mon_appli.exe FICHIERDECONFIG|mon_fichier.ini", vbNormalNoFocus))
handappli = InstanceToWnd(pid2)
SetWindowLong handappli, GWL_EXSTYLE, GetWindowLong(handappli, GWL_EXSTYLE) Or WS_EX_LAYERED
SetLayeredWindowAttributes handappli, 0, 125, LWA_ALPHA
L'application ne se lance pas en transparent.
ladylazy23
Messages postés11Date d'inscriptionjeudi 28 décembre 2000StatutMembreDernière intervention31 août 2009 24 avril 2009 à 15:24
Voilà le code que j'ai mis
pid2 = ShellExecute(0, "open", "mon_appli.exe", " FICHIERDECONFIG|mon_fichier.ini", 0&, 0&)
handappli = InstanceToWnd(pid2)
SetWindowLong handappli, GWL_EXSTYLE, GetWindowLong(handappli, GWL_EXSTYLE) Or WS_EX_LAYERED
SetLayeredWindowAttributes handappli, 0, 125, LWA_ALPHA
Le premier paramètre de shellexecute je l'ai mis à zéro car je ne connait pas encore son handle. Le problème vient surement de là car le handappli reste à zéro.
Vous n’avez pas trouvé la réponse que vous recherchez ?
ladylazy23
Messages postés11Date d'inscriptionjeudi 28 décembre 2000StatutMembreDernière intervention31 août 2009 24 avril 2009 à 16:10
A cause d'un copier coller, j'avais oublié de renommer une variable. Donc maintenant le code error de GetLastError est à 0 mais la fenêtre n'est toujours pas transparente !!