void _toolstrip_EndDrag_(object sender, EventArgs e) { //if (parent == _toolstrip.Parent) //{ parent = _toolstrip.Parent; parentrect = parent.RectangleToScreen(parent.ClientRectangle); Point ShowLocation = Cursor.Position; // フローティング開始 if (!CheckCloss(parentrect, ShowLocation)) { _showing = true; ToolStripPanel tsp = (ToolStripPanel)_toolstrip.Parent; Point lp = _toolstrip.Location; ToolStripLayoutStyle tsls = _toolstrip.LayoutStyle; form = new FloatingWindow(_toolstrip, _parentpanels, _parentform, text, this); form.rectform.EdgeColor = EdgeColor; form.rectform.BackColor = RangeColor; form.LastParent = tsp; form.LastPoint = lp; form.LastStyle = tsls; _parentform.AddOwnedForm(form); //form.Show(); //MessageBox.Show(ShowLocation.ToString()); /*this.Location = ShowLocation; * _toolstrip.LayoutStyle = ToolStripLayoutStyle.HorizontalStackWithOverflow; * this.Size = new Size(_toolstrip.Width + GetSystemMetrics(SystemMetric.SM_CXSIZEFRAME) * 2, * _toolstrip.Height /*+ 20 + GetSystemMetrics(SystemMetric.SM_CXSIZEFRAME) * 2); * this.Controls.Add(_toolstrip); * _toolstrip.Location = new Point(0, 20); * //_toolstrip.Dock = DockStyle.Top; * this.Show();*/ } //} }