I've been using API to bring a window to the foreground but it's not working if it's outside my app... uh, WHY?
VB Code:
Module modWindow 'Declare API Function Private Declare Function BringWindowToTop Lib "user32" (ByVal hwnd As Long) As Long Public Sub SelectWindow(ByVal hwnd As Long) 'Bring target window to front BringWindowToTop(hwnd) End Sub Public Sub proTst(ByVal AppID As Integer) Dim p As System.Diagnostics.Process SelectWindow(Convert.ToInt32(p.GetProcessById(AppID).Handle)) End Sub End Module
Not working... :s! But the API function works fine with let's say the handle of a form inside my app.... very odd...![]()




Reply With Quote