Code:
Private Declare Function BringWindowToTop Lib "user32.dll" (ByVal hwnd As Long) As Long
Private Sub Command1_Click()
BringWindowToTop hWnd '/// THE OTHER APPLICATIONS HANDLE.
SendKeys "{ENTER}"'/// send the enter key to that window to close the messagebox.
End Sub
in that instance i had a seperate application open with a messagebox saying "loaded!" , then from my vb project i clicked Command1 and closed the messagebox.
hope that helps.
|
__________________
~~ please don't PM me regarding code, I only reply to personnal messages ~~
|