WindowsForms中的事件 [英] Events in WindowsForms
问题描述
我有一个Windows窗体应用程序
我有2个PictureBox,其中一个在第二个的前面.
两个pictureBox都有一个doubleClick_event(Object Sender,EventArgs)函数.
当我双击它们上方时,只会触发一个事件,一个事件
与前面的pictureBox关联.
后面的pictureBox不会响应我的点击,尽管它
在与第一个相同的区域.
我该怎么办,以便制作第二个pictureBox,那个是
隐藏在第一个PictureBox
的事件中,以响应我的doubleClick吗?
解决方案
在单击第一个PictureBox
时调用第二个PictureBox
的事件.
如果前面有控件,它永远不会触发.
I have a Windows Form Application
I have 2 pictureBoxes , one in the front of the seconde one .
Both pictureBoxes have a doubleClick_event( Object Sender ,EventArgs ) function .
When I double-click above them , only one event is trigered , the one
associated with the pictureBox that''s in front .
The pictureBox that''s in the back doesnt respond to my click ,although its
in the same area as the first one .
How can I do ,in order to make the second pictureBox ,the one that''s
hidden in the back of the first one , to respond to my doubleClick ?
call the event for the secondPictureBox
when the first one is clicked.
It''s never going to fire if you have a control in front of it.
这篇关于WindowsForms中的事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!