"a" <a@xxxxxx>'s wild thoughts were released on Thu, 19 Jun
2008 15:48:41 +0300 bearing the following fruit:
>Dear I all
>
>I want if I press F4 key the form close
>
>I set the key preview to true
>
>But I ask where can I put code like this and is this code good or not
>
>I mean what the events needed to put code like this
>
>==============================
>
>If e.keycode = Keys.F4 Then
>
>Me.Close()
>
>End If
>
>===================== I can't help wonder why you need to do this, ALT+F4 is the
windows standard for closing a form, and should work for you
already. Are you specifically trying to avoid having to use
the ALT key?
--
Jan Hyde
https://mvp.support.microsoft.com/profile/Jan.Hyde