hmamine
Messages postés15Date d'inscriptionsamedi 3 mai 2003StatutMembreDernière intervention30 septembre 2007
-
21 juin 2005 à 20:55
hmamine
Messages postés15Date d'inscriptionsamedi 3 mai 2003StatutMembreDernière intervention30 septembre 2007
-
22 juin 2005 à 14:30
slt, bon voila j'voudrai savoir si on pe controler une application (exemple.exe, sa visibliter sur l'ecran , son positionnemrnt) par une otre application (celle con a programmer)
daetips
Messages postés142Date d'inscriptionjeudi 10 juillet 2003StatutMembreDernière intervention10 novembre 2007 21 juin 2005 à 21:24
Ben tu dois chopper le handle
Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function MoveWindow Lib "user32" (ByVal hwnd As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long
Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwflags As Long) As Long
Dim handle as long
handle=findwindow(vbnullstring,"Le nom de la fenêtre a modifier")
Public Function Position(ByVal nHwnd As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long)
MoveWindow nHwnd, x, y, nWidth, nHeight, 1
End Function
Par "visiblité sur l'écran" je pense que tu parles de transparence
'alphaAmount entre 0 et 255
Public Sub MakeWindowTransparent(ByVal hwnd As Long, ByVal alphaAmount As Byte)
Dim lStyle As Long
lStyle = GetWindowLong(hwnd, GWL_EXSTYLE)
lStyle = lStyle Or WS_EX_LAYERED
SetWindowLong hwnd, GWL_EXSTYLE, lStyle
SetLayeredWindowAttributes hwnd, 0, alphaAmount, LWA_ALPHA
End Sub