Bonjour a tous,
J'ai déjà posé une question similaire mais peut-être je me suis mal
exprimer. Est-il est possible de savoir quand un PictureBox devient
invisible. Ceci est dans le but de décharger les contrôles a l'intérieure.
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
le_troll
Salut,
Est-ce que ça, ça ne marcherait pas ?
If PictureBox1.Visible = False
-- Merci, @+, bye, Joe troll75 AROBASE iFrance POINT com ------------------------------------------ Ce message est plein de virus "certifiés" Le_Troll, éleveur then de Trolls depuis César, qui disait: Avec une hache, celui qui tient le manche a toujours raison ! ------------------------------------------
"Fournier Raymond" <duracelle(Enlever-ceci)@sympatico.ca> a écrit dans le message de news:
Bonjour a tous, J'ai déjà posé une question similaire mais peut-être je me suis mal exprimer. Est-il est possible de savoir quand un PictureBox devient invisible. Ceci est dans le but de décharger les contrôles a l'intérieure.
Merci Raymond Fournier
Salut,
Est-ce que ça, ça ne marcherait pas ?
If PictureBox1.Visible = False
--
Merci, @+, bye, Joe
troll75 AROBASE iFrance POINT com
------------------------------------------
Ce message est plein de virus "certifiés"
Le_Troll, éleveur then de Trolls depuis César, qui disait:
Avec une hache, celui qui tient le manche a toujours raison !
------------------------------------------
"Fournier Raymond" <duracelle(Enlever-ceci)@sympatico.ca> a écrit dans le
message de news: Xns9543979DA70BduracelleEnleverceci@207.35.177.135...
Bonjour a tous,
J'ai déjà posé une question similaire mais peut-être je me suis mal
exprimer. Est-il est possible de savoir quand un PictureBox devient
invisible. Ceci est dans le but de décharger les contrôles a l'intérieure.
-- Merci, @+, bye, Joe troll75 AROBASE iFrance POINT com ------------------------------------------ Ce message est plein de virus "certifiés" Le_Troll, éleveur then de Trolls depuis César, qui disait: Avec une hache, celui qui tient le manche a toujours raison ! ------------------------------------------
"Fournier Raymond" <duracelle(Enlever-ceci)@sympatico.ca> a écrit dans le message de news:
Bonjour a tous, J'ai déjà posé une question similaire mais peut-être je me suis mal exprimer. Est-il est possible de savoir quand un PictureBox devient invisible. Ceci est dans le but de décharger les contrôles a l'intérieure.
Merci Raymond Fournier
Fournier Raymond
"le_troll" wrote in news:#b2r$:
Salut,
Est-ce que ça, ça ne marcherait pas ?
If PictureBox1.Visible = False
-- Merci, @+, bye, Joe troll75 AROBASE iFrance POINT com ------------------------------------------ Ce message est plein de virus "certifiés" Le_Troll, éleveur then de Trolls depuis César, qui disait: Avec une hache, celui qui tient le manche a toujours raison ! ------------------------------------------
"Fournier Raymond" <duracelle(Enlever-ceci)@sympatico.ca> a écrit dans le message de news:
Bonjour a tous, J'ai déjà posé une question similaire mais peut-être je me suis mal exprimer. Est-il est possible de savoir quand un PictureBox devient invisible. Ceci est dans le but de décharger les contrôles a l'intérieure.
Merci Raymond Fournier
Bien sur pourquoi faire compliquer quand sa peux être facile
Merci Raymond Fournier
"le_troll" <le_trol@paris.fr> wrote in
news:#b2r$KKgEHA.596@TK2MSFTNGP11.phx.gbl:
Salut,
Est-ce que ça, ça ne marcherait pas ?
If PictureBox1.Visible = False
--
Merci, @+, bye, Joe
troll75 AROBASE iFrance POINT com
------------------------------------------
Ce message est plein de virus "certifiés"
Le_Troll, éleveur then de Trolls depuis César, qui disait:
Avec une hache, celui qui tient le manche a toujours raison !
------------------------------------------
"Fournier Raymond" <duracelle(Enlever-ceci)@sympatico.ca> a écrit dans
le message de news:
Xns9543979DA70BduracelleEnleverceci@207.35.177.135...
Bonjour a tous,
J'ai déjà posé une question similaire mais peut-être je me suis
mal
exprimer. Est-il est possible de savoir quand un PictureBox devient
invisible. Ceci est dans le but de décharger les contrôles a
l'intérieure.
Merci Raymond Fournier
Bien sur pourquoi faire compliquer quand sa peux être facile
-- Merci, @+, bye, Joe troll75 AROBASE iFrance POINT com ------------------------------------------ Ce message est plein de virus "certifiés" Le_Troll, éleveur then de Trolls depuis César, qui disait: Avec une hache, celui qui tient le manche a toujours raison ! ------------------------------------------
"Fournier Raymond" <duracelle(Enlever-ceci)@sympatico.ca> a écrit dans le message de news:
Bonjour a tous, J'ai déjà posé une question similaire mais peut-être je me suis mal exprimer. Est-il est possible de savoir quand un PictureBox devient invisible. Ceci est dans le but de décharger les contrôles a l'intérieure.
Merci Raymond Fournier
Bien sur pourquoi faire compliquer quand sa peux être facile
Private Sub Command1_Click() Picture1.Visible = Not Picture1.Visible End Sub
Private Sub Form_Load() Me.Caption = "Simulateur d'événement OnHide/OnShow" Command1.Caption = "Cliquer ici" Call Hook(Picture1.hWnd) End Sub
Private Sub Form_Unload(Cancel As Integer) Call Unhook End Sub '*** '*** ' Module1 Option Explicit
Private Type CWPSTRUCT lParam As Long wParam As Long message As Long hWnd As Long End Type
Private Declare Function CallNextHookEx _ Lib "user32" _ ( _ ByVal hHook As Long, _ ByVal nCode As Long, _ ByVal wParam As Long, _ ByRef lParam As CWPSTRUCT _ ) As Long
Private Declare Function SetWindowsHookEx _ Lib "user32" _ Alias "SetWindowsHookExA" _ ( _ ByVal idHook As Long, _ ByVal lpfn As Long, _ ByVal hmod As Long, _ ByVal dwThreadId As Long _ ) As Long
Private Declare Function UnhookWindowsHookEx _ Lib "user32" _ ( _ ByVal hHook As Long _ ) As Long
Private Const WH_CALLWNDPROC As Long = &H4 Private Const WM_SHOWWINDOW As Long = &H18 Private m_hWinHook As Long Private m_hWndWatched As Long
Public Sub Hook(ByRef hWndWatched As Long) m_hWndWatched = hWndWatched m_hWinHook = SetWindowsHookEx(WH_CALLWNDPROC, AddressOf CallWndProc, 0&, App.ThreadID) End Sub
Public Sub Unhook() If (m_hWinHook <> 0&) Then Call UnhookWindowsHookEx(m_hWinHook) m_hWinHook = 0& m_hWndWatched = 0& End If End Sub
Public Function CallWndProc(ByVal nCode As Long, ByVal wParam As Long, ByRef lParam As CWPSTRUCT) As Long If (lParam.hWnd = m_hWndWatched) Then If (lParam.message = WM_SHOWWINDOW) Then If (lParam.wParam = 1) Then ' visible Debug.Print "visible" Else ' invisible Debug.Print "invisible" End If End If End If CallWndProc = CallNextHookEx(m_hWinHook, nCode, wParam, lParam) End Function '***
-- Cordialement Yanick Lefebvre - MVP pour Visual Basic Le français se refait une beauté, parlons en : http://www.orthographe-recommandee.info/
Private Sub Command1_Click()
Picture1.Visible = Not Picture1.Visible
End Sub
Private Sub Form_Load()
Me.Caption = "Simulateur d'événement OnHide/OnShow"
Command1.Caption = "Cliquer ici"
Call Hook(Picture1.hWnd)
End Sub
Private Sub Form_Unload(Cancel As Integer)
Call Unhook
End Sub
'***
'***
' Module1
Option Explicit
Private Type CWPSTRUCT
lParam As Long
wParam As Long
message As Long
hWnd As Long
End Type
Private Declare Function CallNextHookEx _
Lib "user32" _
( _
ByVal hHook As Long, _
ByVal nCode As Long, _
ByVal wParam As Long, _
ByRef lParam As CWPSTRUCT _
) As Long
Private Declare Function SetWindowsHookEx _
Lib "user32" _
Alias "SetWindowsHookExA" _
( _
ByVal idHook As Long, _
ByVal lpfn As Long, _
ByVal hmod As Long, _
ByVal dwThreadId As Long _
) As Long
Private Declare Function UnhookWindowsHookEx _
Lib "user32" _
( _
ByVal hHook As Long _
) As Long
Private Const WH_CALLWNDPROC As Long = &H4
Private Const WM_SHOWWINDOW As Long = &H18
Private m_hWinHook As Long
Private m_hWndWatched As Long
Public Sub Hook(ByRef hWndWatched As Long)
m_hWndWatched = hWndWatched
m_hWinHook = SetWindowsHookEx(WH_CALLWNDPROC, AddressOf CallWndProc, 0&,
App.ThreadID)
End Sub
Public Sub Unhook()
If (m_hWinHook <> 0&) Then
Call UnhookWindowsHookEx(m_hWinHook)
m_hWinHook = 0&
m_hWndWatched = 0&
End If
End Sub
Public Function CallWndProc(ByVal nCode As Long, ByVal wParam As Long, ByRef
lParam As CWPSTRUCT) As Long
If (lParam.hWnd = m_hWndWatched) Then
If (lParam.message = WM_SHOWWINDOW) Then
If (lParam.wParam = 1) Then
' visible
Debug.Print "visible"
Else
' invisible
Debug.Print "invisible"
End If
End If
End If
CallWndProc = CallNextHookEx(m_hWinHook, nCode, wParam, lParam)
End Function
'***
--
Cordialement
Yanick Lefebvre - MVP pour Visual Basic
Le français se refait une beauté, parlons en :
http://www.orthographe-recommandee.info/
Private Sub Command1_Click() Picture1.Visible = Not Picture1.Visible End Sub
Private Sub Form_Load() Me.Caption = "Simulateur d'événement OnHide/OnShow" Command1.Caption = "Cliquer ici" Call Hook(Picture1.hWnd) End Sub
Private Sub Form_Unload(Cancel As Integer) Call Unhook End Sub '*** '*** ' Module1 Option Explicit
Private Type CWPSTRUCT lParam As Long wParam As Long message As Long hWnd As Long End Type
Private Declare Function CallNextHookEx _ Lib "user32" _ ( _ ByVal hHook As Long, _ ByVal nCode As Long, _ ByVal wParam As Long, _ ByRef lParam As CWPSTRUCT _ ) As Long
Private Declare Function SetWindowsHookEx _ Lib "user32" _ Alias "SetWindowsHookExA" _ ( _ ByVal idHook As Long, _ ByVal lpfn As Long, _ ByVal hmod As Long, _ ByVal dwThreadId As Long _ ) As Long
Private Declare Function UnhookWindowsHookEx _ Lib "user32" _ ( _ ByVal hHook As Long _ ) As Long
Private Const WH_CALLWNDPROC As Long = &H4 Private Const WM_SHOWWINDOW As Long = &H18 Private m_hWinHook As Long Private m_hWndWatched As Long
Public Sub Hook(ByRef hWndWatched As Long) m_hWndWatched = hWndWatched m_hWinHook = SetWindowsHookEx(WH_CALLWNDPROC, AddressOf CallWndProc, 0&, App.ThreadID) End Sub
Public Sub Unhook() If (m_hWinHook <> 0&) Then Call UnhookWindowsHookEx(m_hWinHook) m_hWinHook = 0& m_hWndWatched = 0& End If End Sub
Public Function CallWndProc(ByVal nCode As Long, ByVal wParam As Long, ByRef lParam As CWPSTRUCT) As Long If (lParam.hWnd = m_hWndWatched) Then If (lParam.message = WM_SHOWWINDOW) Then If (lParam.wParam = 1) Then ' visible Debug.Print "visible" Else ' invisible Debug.Print "invisible" End If End If End If CallWndProc = CallNextHookEx(m_hWinHook, nCode, wParam, lParam) End Function '***
-- Cordialement Yanick Lefebvre - MVP pour Visual Basic Le français se refait une beauté, parlons en : http://www.orthographe-recommandee.info/