There may be a better way but this VB code works for me and should give you
a starter if your scenario is different...
' only ever 1 msgbox in our scenario
' else we have to check for title with GetWindowTextW
Dim hwnd As IntPtr
hwnd = Win32Api.FindWindow("Dialog", Nothing)
If IntPtr.op_Equality(hwnd, IntPtr.Zero) = False Then
Win32Api.PostMessage(hwnd, Win32Api.WM_CLOSE, 0, 0)
Win32Api.PostMessage(hwnd, Win32Api.WM_DESTROY, 0,
0)
End If
Cheers
Daniel
"Matteo Gabella" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> hi all, is there a way to close msgbox programmatically?
> (i need to drop a system "Pocket Pc Networking" msgbox...)
> i've checked for "SetWindowsHookEx" but it seems to be absent from CF
APIs...
> any suggestion?
> tx
> matteo gabella
> www.stranigiorni.com