userl
2021-12-26 11:21
采纳率: 100%
浏览 36

VB中一个Image控件叠在PictureBox控件的上边,怎样在单机图像框控件(PictureBox)区域时,触发Image控件的MouseDown、MouseMove、MouseUp等事件?

VB中一个Image控件叠在PictureBox控件的上边,怎样在单机图像框控件(PictureBox)区域时,触发Image控件的MouseDown、MouseMove、MouseUp等事件?

img

Private Sub Image1_Click()
MsgBox Image1.Name
End Sub

Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Form1.Print "Image1MouseDown"
End Sub

Private Sub Image1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Form1.Print "Image1MouseUp"
End Sub

就是上边图片对应的代码,单击被遮挡的PictureBox区域,没反应。要求PictureBox控件上边的控件必须为透明,能触发相关事件。帮助解答一下。

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

3条回答 默认 最新

相关推荐 更多相似问题