Bonjour,
Je cherche l'évenement qui est déclanché lorsqu'une fenêtre est
déplacée. Parce que je sais déjà lorsque la fenetre est redimensionnée
(Form_Resize), mais je voudrais savoir lorsqu'elle est déplacée. Est-ce
qu'un tel événement existe en vb6? si oui, lequel? si non, comment puis-je
savoir quand la fenêtre a été déplacée?
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByRef lpvParam As Any, ByVal fuWinIni As Long) As Long Private Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As Any, pSrc As Any, ByVal ByteLen As Long)
Private Const SPI_GETWORKAREA = &H30 Private Const WM_MOVING As Long = &H216 Private Const GWL_WNDPROC As Long = -4
Private Type RECT left As Long top As Long right As Long bottom As Long End Type
Private Type POINTAPI x As Long y As Long End Type
If (rc.bottom >= WorkArea.bottom) Or _ (rc.left <= WorkArea.left) Or _ (rc.right >= WorkArea.right) Or _ (rc.top <= WorkArea.top) Then rc = m_rc Else m_rc = rc End If
Merci de poster les réponses au groupe afin d'en faire profiter à tous "ThunderMusic" wrote in message news:etZH%
Bonjour, Je cherche l'évenement qui est déclanché lorsqu'une fenêtre
est
déplacée. Parce que je sais déjà lorsque la fenetre est redimensionnée (Form_Resize), mais je voudrais savoir lorsqu'elle est déplacée. Est-ce qu'un tel événement existe en vb6? si oui, lequel? si non, comment puis-je savoir quand la fenêtre a été déplacée?
Merci Beaucoup
ThunderMusic
Bonjour Mr. Latulippe!
Tu dois subclasser le message WM_MOVING.
Voici un exemple qui empeche le formulaire de quitter les bordures de
l'écran.
'***
' Form1
Option Explicit
Private Sub Form_Load()
SubClass Me.hWnd
End Sub
Private Sub Form_Unload(Cancel As Integer)
UnSubClass Me.hWnd
End Sub
Private Declare Function SystemParametersInfo Lib "user32" Alias
"SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByRef
lpvParam As Any, ByVal fuWinIni As Long) As Long
Private Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA"
(ByVal lpPrevWndFunc As Long, ByVal hWnd As Long, ByVal Msg As Long, ByVal
wParam As Long, ByVal lParam As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA"
(ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As
Any, pSrc As Any, ByVal ByteLen As Long)
Private Const SPI_GETWORKAREA = &H30
Private Const WM_MOVING As Long = &H216
Private Const GWL_WNDPROC As Long = -4
Private Type RECT
left As Long
top As Long
right As Long
bottom As Long
End Type
Private Type POINTAPI
x As Long
y As Long
End Type
If (rc.bottom >= WorkArea.bottom) Or _
(rc.left <= WorkArea.left) Or _
(rc.right >= WorkArea.right) Or _
(rc.top <= WorkArea.top) Then
rc = m_rc
Else
m_rc = rc
End If
Merci de poster les réponses au groupe afin d'en faire profiter à tous
"ThunderMusic" <NOdlatulippe@teldig.comSPAM> wrote in message
news:etZH%23NicDHA.1044@TK2MSFTNGP10.phx.gbl...
Bonjour,
Je cherche l'évenement qui est déclanché lorsqu'une fenêtre
est
déplacée. Parce que je sais déjà lorsque la fenetre est redimensionnée
(Form_Resize), mais je voudrais savoir lorsqu'elle est déplacée. Est-ce
qu'un tel événement existe en vb6? si oui, lequel? si non, comment puis-je
savoir quand la fenêtre a été déplacée?
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByRef lpvParam As Any, ByVal fuWinIni As Long) As Long Private Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As Any, pSrc As Any, ByVal ByteLen As Long)
Private Const SPI_GETWORKAREA = &H30 Private Const WM_MOVING As Long = &H216 Private Const GWL_WNDPROC As Long = -4
Private Type RECT left As Long top As Long right As Long bottom As Long End Type
Private Type POINTAPI x As Long y As Long End Type
If (rc.bottom >= WorkArea.bottom) Or _ (rc.left <= WorkArea.left) Or _ (rc.right >= WorkArea.right) Or _ (rc.top <= WorkArea.top) Then rc = m_rc Else m_rc = rc End If
Merci de poster les réponses au groupe afin d'en faire profiter à tous "ThunderMusic" wrote in message news:etZH%
Bonjour, Je cherche l'évenement qui est déclanché lorsqu'une fenêtre
est
déplacée. Parce que je sais déjà lorsque la fenetre est redimensionnée (Form_Resize), mais je voudrais savoir lorsqu'elle est déplacée. Est-ce qu'un tel événement existe en vb6? si oui, lequel? si non, comment puis-je savoir quand la fenêtre a été déplacée?
Merci Beaucoup
ThunderMusic
ThunderMusic
merci, je vais essayer. ;)
"Zoury" wrote in message news:
Bonjour Mr. Latulippe!
Tu dois subclasser le message WM_MOVING.
Voici un exemple qui empeche le formulaire de quitter les bordures de l'écran. '*** ' Form1 Option Explicit
Private Sub Form_Load() SubClass Me.hWnd End Sub
Private Sub Form_Unload(Cancel As Integer) UnSubClass Me.hWnd End Sub
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long,
ByRef
lpvParam As Any, ByVal fuWinIni As Long) As Long Private Declare Function CallWindowProc Lib "user32" Alias
"CallWindowProcA"
(ByVal lpPrevWndFunc As Long, ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As
Long
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst
As
Any, pSrc As Any, ByVal ByteLen As Long)
Private Const SPI_GETWORKAREA = &H30 Private Const WM_MOVING As Long = &H216 Private Const GWL_WNDPROC As Long = -4
Private Type RECT left As Long top As Long right As Long bottom As Long End Type
Private Type POINTAPI x As Long y As Long End Type
If (rc.bottom >= WorkArea.bottom) Or _ (rc.left <= WorkArea.left) Or _ (rc.right >= WorkArea.right) Or _ (rc.top <= WorkArea.top) Then rc = m_rc Else m_rc = rc End If
Merci de poster les réponses au groupe afin d'en faire profiter à tous "ThunderMusic" wrote in message news:etZH% > Bonjour, > Je cherche l'évenement qui est déclanché lorsqu'une fenêtre est > déplacée. Parce que je sais déjà lorsque la fenetre est redimensionnée > (Form_Resize), mais je voudrais savoir lorsqu'elle est déplacée. Est-ce > qu'un tel événement existe en vb6? si oui, lequel? si non, comment
puis-je
> savoir quand la fenêtre a été déplacée? > > Merci Beaucoup > > ThunderMusic > >
merci, je vais essayer. ;)
"Zoury" <yanick_lefebvre@hotmail.com> wrote in message
news:ew54eVicDHA.1128@tk2msftngp13.phx.gbl...
Bonjour Mr. Latulippe!
Tu dois subclasser le message WM_MOVING.
Voici un exemple qui empeche le formulaire de quitter les bordures de
l'écran.
'***
' Form1
Option Explicit
Private Sub Form_Load()
SubClass Me.hWnd
End Sub
Private Sub Form_Unload(Cancel As Integer)
UnSubClass Me.hWnd
End Sub
Private Declare Function SystemParametersInfo Lib "user32" Alias
"SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long,
ByRef
lpvParam As Any, ByVal fuWinIni As Long) As Long
Private Declare Function CallWindowProc Lib "user32" Alias
"CallWindowProcA"
(ByVal lpPrevWndFunc As Long, ByVal hWnd As Long, ByVal Msg As Long, ByVal
wParam As Long, ByVal lParam As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA"
(ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As
Long
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst
As
Any, pSrc As Any, ByVal ByteLen As Long)
Private Const SPI_GETWORKAREA = &H30
Private Const WM_MOVING As Long = &H216
Private Const GWL_WNDPROC As Long = -4
Private Type RECT
left As Long
top As Long
right As Long
bottom As Long
End Type
Private Type POINTAPI
x As Long
y As Long
End Type
If (rc.bottom >= WorkArea.bottom) Or _
(rc.left <= WorkArea.left) Or _
(rc.right >= WorkArea.right) Or _
(rc.top <= WorkArea.top) Then
rc = m_rc
Else
m_rc = rc
End If
Merci de poster les réponses au groupe afin d'en faire profiter à tous
"ThunderMusic" <NOdlatulippe@teldig.comSPAM> wrote in message
news:etZH%23NicDHA.1044@TK2MSFTNGP10.phx.gbl...
> Bonjour,
> Je cherche l'évenement qui est déclanché lorsqu'une fenêtre
est
> déplacée. Parce que je sais déjà lorsque la fenetre est redimensionnée
> (Form_Resize), mais je voudrais savoir lorsqu'elle est déplacée. Est-ce
> qu'un tel événement existe en vb6? si oui, lequel? si non, comment
puis-je
> savoir quand la fenêtre a été déplacée?
>
> Merci Beaucoup
>
> ThunderMusic
>
>
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long,
ByRef
lpvParam As Any, ByVal fuWinIni As Long) As Long Private Declare Function CallWindowProc Lib "user32" Alias
"CallWindowProcA"
(ByVal lpPrevWndFunc As Long, ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As
Long
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst
As
Any, pSrc As Any, ByVal ByteLen As Long)
Private Const SPI_GETWORKAREA = &H30 Private Const WM_MOVING As Long = &H216 Private Const GWL_WNDPROC As Long = -4
Private Type RECT left As Long top As Long right As Long bottom As Long End Type
Private Type POINTAPI x As Long y As Long End Type
If (rc.bottom >= WorkArea.bottom) Or _ (rc.left <= WorkArea.left) Or _ (rc.right >= WorkArea.right) Or _ (rc.top <= WorkArea.top) Then rc = m_rc Else m_rc = rc End If
Merci de poster les réponses au groupe afin d'en faire profiter à tous "ThunderMusic" wrote in message news:etZH% > Bonjour, > Je cherche l'évenement qui est déclanché lorsqu'une fenêtre est > déplacée. Parce que je sais déjà lorsque la fenetre est redimensionnée > (Form_Resize), mais je voudrais savoir lorsqu'elle est déplacée. Est-ce > qu'un tel événement existe en vb6? si oui, lequel? si non, comment
puis-je
> savoir quand la fenêtre a été déplacée? > > Merci Beaucoup > > ThunderMusic > >