"Adrian Forbes [ASP MVP]" <so***@noemail.zzz> writes:
What am I missing?
The picturebox has no key events so why bother with the focus? If your
ultimate goal cannot be achieved why spend time on it?
Thanks for the follow-up. I have wondered why for a picture box there are
no keyevents in the event drop-down-combo-box. But interestingly VB.net
-does- allow me to write such an event handler:
Private Sub picBox_KeyDown(ByVal sender As System.Object, ByVal e As _
System.Windows.Forms.KeyEventArgs) Handles picBox.KeyDown
...
End Sub
As I mentioned in an earlier note, I am able to give the picture box focus
with:
Private Sub picBox_MouseEnter(ByVal sender As Object, ByVal e As _
System.EventArgs) Handles picBox.MouseEnter
picBox.Focus()
End Sub
and then it responds to KeyDown events. I'm wondering if there is a way for
it to get the initial focus automatically on startup.
Thanks,
Raja