private void pictureBox1_MouseDoubleClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { this.oldvalue = this.value; ValueDlg vdlg = new ValueDlg(this.value, this.np); if (vdlg.ShowDialog() == DialogResult.OK) { this.value = vdlg.Value; // Hack to make sure the valuechanged event is fired this.Value = this.value; } } this.displayvalue = this.value * factor; base.OnMouseDoubleClick(e); }
private void pictureBox1_MouseDoubleClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { this.oldvalue = this.value; ValueDlg vdlg = new ValueDlg(this.value, this.np); if (vdlg.ShowDialog() == DialogResult.OK) { Application.DoEvents(); this.value = vdlg.Value; // Hack to make sure the valuechanged event is fired this.Value = this.value; } Application.DoEvents(); } base.OnMouseDoubleClick(e); }