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

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -