Greetings! I am trying to write a simple app that will flash the form's title bar using the FlashWindow API. However I am getting the this error message:
A call to PInvoke function 'FlashWindowTest1!FlashWindowTest1.Form1::FlashWindow' 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.
Can someone please look at my code and tell me what I am doing wrong?
Thanks!
(txmed)
A call to PInvoke function 'FlashWindowTest1!FlashWindowTest1.Form1::FlashWindow' 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.
Can someone please look at my code and tell me what I am doing wrong?
Thanks!
(txmed)
Code:
Public Class Form1
Private Declare Function FlashWindow Lib "user32" (ByVal hwnd As IntPtr, ByVal bInvert As Long) As Long
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
FlashWindow(Me.Handle, 1)
End Sub
End Class