protected override void ButtonClicked() { Dialog_InputDate _f = new Dialog_InputDate(); Point _p = this.te_Value.PointToScreen(new Point(0, this.Height)); _f.Left = _p.X; _f.Top = _p.Y; if (_f.ShowDialog() == DialogResult.OK) { AddValue(_f.GetSelectedChineseData()); } }
protected override void ButtonClicked() { Dialog_InputDate _f = new Dialog_InputDate(); Point _p = this.te_Value.PointToScreen(new Point(0, this.Height)); if ((_p.X + _f.Width) > Screen.PrimaryScreen.Bounds.Width) { _p.X = Screen.PrimaryScreen.Bounds.Width - _f.Width; } if ((_p.Y + _f.Height) > Screen.PrimaryScreen.Bounds.Height) { _p.Y = Screen.PrimaryScreen.Bounds.Height - _f.Height; } _f.Left = _p.X; _f.Top = _p.Y; if (_f.ShowDialog() == DialogResult.OK) { AddValue(_f.GetSelectedChineseData()); } }