I get this exception error?
Managed Debugging Assistant 'PInvokeStackImbalance' has detected a problem in 'C:\Users\Derek\Documents\Visual Studio 2012\Projects\WindowsApplication2\WindowsApplicati on2\bin\Debug\WindowsApplication2.vshost.exe'.
Additional Information: A call to PInvoke function 'WindowsApplication2!WindowsApplication2.Form1::Ge tAsyncKeyState' 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.
So today I was trying my first project in Visual Basic and when I start the Debug I get this. How do I fix it?
Please post your GetAsyncKeyState function here, it's most likely wrong. In .NET 2.0 to 3.5, it will automatically fix this issue silently but starting from .NET 4.0 it will create this exception.