1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| Option Compare Database
Option Explicit
' déclaration des constantes et de l'aPI
Private Const SWP_NOSIZE = &H1
Private Const SWP_NOMOVE = &H2
Private Const HWND_TOPMOST = -1
Private Declare Function 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) As Long
Private Sub PremierPlan(F As Form)
' appel de la fontion
Call SetWindowPos(F.hwnd, HWND_TOPMOST, 0&, 0&, 0&, 0&, (SWP_NOSIZE Or SWP_NOMOVE))
End Sub
Private Sub Form_Load()
' appel de la fonction au chargement de la feuille
PremierPlan Me
End Sub |
Partager