Jonathan
Jonathan

Reputation: 161

winforms closing issue, vb.net

i have a vb.net 2.0 winforms application. When i open another application (like calculator ) have the focus to it and try to close my application the screen freeze and i have to use ctrl + alt + del to get it to refresh.

Any idea what can affect that?

Upvotes: 1

Views: 255

Answers (1)

tobrien
tobrien

Reputation: 618

If I understand your dilemma, somewhere you're sending SENDKEYS, and if you do not have focus and you SENDKEYs the app freezes.

Why not simply add a

if Me.Focus then SendKeys

Upvotes: 1

Related Questions