简体   繁体   中英

Block PictureBox to receive events C#

我希望你能帮助我:))我想阻止/启用PictureBox接收事件,我不能自己做,请帮助我:)事先感谢:*

Just disable the PictureBox :

PictureBox1.Enabled = false; // Will not fire any events
PictureBox1.Enabled = true; // Will now fire events

While it's disabled, it will not cause any events to fire. There's no way to stop other events changing the PictureBox's properties though, unless you create your own class inheriting from the PictureBox and override/hide all the other properties/method calls.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM