MouseWheel not work with my panel

smiles

Well-known member
Joined
May 21, 2008
Messages
47
Programming Experience
Beginner
My panel contains the picturebox, when I zoom in the picture box dimension, the panel has its scrollbar, but I can use the wheel of mouse to move the vertical scroll bar ?
Do you know why ?
Thanks !!!
 

Attachments

  • untitled.JPG
    untitled.JPG
    173.8 KB · Views: 27
The mousescroll only works when a control is selected. Picturebox is never selected, unless you do it explicitly in code. Try to Select it in MouseClick event.
 
Very thanks, that works !!!
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
Panel1.Select()
End Sub
 
Back
Top