c# - User Control button click not working as expected -
c# - User Control button click not working as expected -
i have created user command should deed button in windows forms application.
it looks
public partial class controlbutton : usercontrol { .. .. public controlbutton(string id) { initializecomponent(); this.click += new eventhandler(controlbutton_click); this.mouseenter += new mouseeventhandler(controlbutton_mouseenter); } }
the issue click event not fired consistently. gets clicked every 5-6 times click on it. there no issue mouseenter event , gets fired consistently.
i tried this.mouseclick, this.mousedown events raise event, these working inconsistently. thought how solve this?
short answer: command or form handling wm_lbuttondown message.
does usercontrol have children , focused before click? give more info reply question completely.
have looked @ wm_messages command receiving when click on it?
c# winforms event-handling
Comments
Post a Comment