Bonjour,

Je travaille sur un code VBA qui permet de manipuler une application externe (Axel).
Ma question, y a t-il un moyen de mettre cette application en plein écran avec le VBA?

Voici un de bout de mon code pour illustration:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
Declare Function GetSystemMetrics32 Lib "user32" Alias "GetSystemMetrics" (ByVal nIndex As Long) As Long
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function GetWindow& Lib "user32" (ByVal hWnd&, ByVal wCmd&)
Private Declare Function GetWindowLong& Lib "user32" _
Alias "GetWindowLongA" (ByVal hWnd&, ByVal nIndex&)
Private Declare Function GetWindowText& Lib "user32" Alias _
"GetWindowTextA" (ByVal hWnd&, ByVal lpString$, ByVal aint&)
Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
Private Const mconMAXLEN = 255
 
Sub AxelActivate()
 
Dim hWnd&, Style&, Title$, i&
Dim appStatus As String
 
    appStatus = ""
 
    hWnd = GetWindow(GetDesktopWindow(), 5)
 
    Do While hWnd
        Title = GetCaption(hWnd)
        If Len(Title) Then
            If GetWindowLong(hWnd, -16) And &H10000000 Then
                If InStr(1, Title, "Axel", 1) Then
                    AppActivate Title
                    SendKeys "~"
                    appStatus = "Ready"
                    Exit Do
                End If
            End If
        End If
        hWnd = GetWindow(hWnd, 2)
    Loop
Merci d'avance !