Hello,
How to call the code below:
from a Button1 Click event:Code:private void Control_MouseDown(System.Object sender, System.Windows.Forms.MouseEventArgs e) { Control control = (Control)sender; if (control.Capture) { TextBox1.Text = control.Name + " has captured the mouse"; } }
Code:private void Button1_Click(object sender, EventArgs e) { //this code doesn't work - returns invalid arguments Control_MouseDown(sender, control) }




Reply With Quote
