I am using vb.net 2005. I am automating an instance of shdocvw.internetexplorer, and my boss wants me to ensure that the window (once opened) always goes to the front. So I was doing some research and I found some code and tried to implement it into my code. I got the following error:
BringWindowToTop(ie.HWND) '<--- THIS IS THE LINE IT CRASHES ON
(err) -> A call to PInvoke function 'IonData Maricopa Credit Watch!IonData_Maricopa_Credit_Watch.myWeb::BringWindowToTop' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.
Private Declare Function BringWindowToTop Lib "user32" (ByVal hwnd As Long) As Long
Public myExplorer As New SHDocVw.InternetExplorer