c# - button click method doesn't work as it's visibility changes -
i have picturebox(called pic_image) , 2 buttons(called btn_addimage & btn_removeimage). want make buttons visible user moves mouse on pic_image , make them invisibe mouse leaves pic_image. code making visible:
private void pic_image_mousemove(object sender, mouseeventargs e) { btn_addimage.visible = true; btn_removeimage.visible = true; }
and code making invisible:
private void pic_image_mouseleave(object sender, eventargs e) { btn_addimage.visible = false; btn_removeimage.visible = false; }
the problem after use pic_image_mousemove method onbutton click method doesn't work.
thanks in advance
mouse movie events continuously fires until mouse on picture replace mouse move mouse enter
private void pic_image_mouseenter(object sender, mouseeventargs e) { btn_addimage.visible = true; btn_removeimage.visible = true; if (pic_image.image != null) btn_removeimage.visible = true; }
Comments
Post a Comment