Mouse events not called in VB WPF, does z-order matter?

后端 未结 2 1184
野的像风
野的像风 2021-01-26 09:14

There are many explanation in google, but I still struggling to implement mouse events.

  • I have tried to use MouseEnter=\"Canvas1_MouseEnter\" in canva
2条回答
  •  日久生厌
    2021-01-26 09:41

    Your canvas does not have the MouseEnter event. Use it like this

    
        
    
    

    And then the Sub for the Event:

    Private Sub Canvas_MouseEnter(sender As Object, e As MouseEventArgs)
        MessageBox.Show("Hello?")
    End Sub
    

提交回复
热议问题