vb.net - PInvokeStackImbalance was detected in my program -
i try coordinates left mouse clicked during timer working. had error "pinvokestackimbalance detected" . how rid of error? partial program following.
enter code here
private declare function getasynckeystate lib "user32" (byval vkey long) integer declare sub mouse_event lib "user32" alias "mouse_event" (byval dwflags integer, byval dx integer, byval dy integer, byval cbuttons integer, byval dwextrainfo integer) public const mouseeventf_leftdown = &h2 public const mouseeventf_leftup = &h4 public const mouseeventf_middledown = &h20 public const mouseeventf_middleup = &h40 public const mouseeventf_rightdown = &h8 public const mouseeventf_rightup = &h10 dim mouse_leftclick boolean private sub timerrec_tick(sender object, e eventargs) handles timerrec.tick mouse_leftclick = getasynckeystate(keys.lbutton) ' **error occured here!** if mouse_leftclick messagebox.show(mouseposition.x.tostring & " " & mouseposition.y.tostring) end if end sub
wiki
Comments
Post a Comment