Try this:
VB Code:
' Put this at the top of your form. Private Const WM_CLOSE As Long = &H10 Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" ( _ ByVal hwnd As Long, _ ByVal wMsg As Long, _ ByVal wParam As Long, _ ByRef lParam As Any) As Long
And then to call:
VB Code:
SendMessage Command1.hwnd, WM_CLOSE, 0, 0 Me.Refresh
Where Command1 is the name of the control
Edit: that will not work because the Picturebox does not have a .hwnd s it is not a window its self...
Cheers,
RyanJ





Reply With Quote