Hi Nilesh,
Thanks for helping. Could you reply my thread 630908 and 630911 with detail example please.
Thanks & regards,
Sajjad
>try this,
>
>Option Explicit
>
> Private Declare Function FindWindow Lib "user32" _
> Alias "FindWindowA" (ByVal lpClassName As String, _
> ByVal lpWindowName As String) As Long
> Private Declare Function SendMessage Lib "user32" _
> Alias "SendMessageA" (ByVal hWnd As Long, ByVal _
> wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
>
> Private Const WM_CLOSE = &H10
>
> Private Const MsgTitle As String = "Test Message"
>
> Private Sub Command1_Click()
> With Timer1
> .Interval = 2000
> .Enabled = True
> End With
> MsgBox "I should disappear in two seconds.", , MsgTitle
> End Sub
>
> Private Sub Timer1_Timer()
> Dim hWnd As Long
> Timer1.Enabled = False
>
> hWnd = FindWindow(vbNullString, MsgTitle)
> Call SendMessage(hWnd, WM_CLOSE, 0, ByVal 0&)
> End Sub
Sajjad Ahmad