1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
Option Explicit
Private Declare Function FindWindow Lib "User32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Const HWND_BOTTOM = 1
Const HWND_NOTOPMOST = -2
Const HWND_TOP = 0
Const HWND_TOPMOST = -1
Const SWP_NOSIZE = &H1
Const SWP_NOMOVE = &H2
Const SWP_NOACTIVATE = &H10
Const SWP_SHOWWINDOW = &H40
Private Declare Sub SetWindowPos Lib "User32" (ByVal Hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long)
Sub Main()
Dim hWndXL As Long
hWndXL = FindWindow("screenClass", vbNullString) 'RECUPERE LE HANDLE DE POWER POINT
Call SetWindowPos(hWndXL, HWND_NOTOPMOST, 0, 0, 1920, 1080, SWP_NOSIZE) 'SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE
Dim I
'temporisation
For I = 1 To 10000
Debug.Print ""
Next I
DoEvents
SendKeys "{RIGHT}", True
'SendKeys "{LEFT}", True
End
End Sub |
Partager