コード例 #1
0
 private void GiveToolStripPanelFeedback(ToolStrip toolStripToDrag, Point screenLocation)
 {
     if ((this.Orientation == System.Windows.Forms.Orientation.Horizontal) && (this.RightToLeft == RightToLeft.Yes))
     {
         screenLocation.Offset(-toolStripToDrag.Width, 0);
     }
     if (CurrentFeedbackRect == null)
     {
         CurrentFeedbackRect = new FeedbackRectangle(toolStripToDrag.ClientRectangle);
     }
     if (!CurrentFeedbackRect.Visible)
     {
         toolStripToDrag.SuspendCaputureMode();
         try
         {
             CurrentFeedbackRect.Show(screenLocation);
             toolStripToDrag.CaptureInternal = true;
         }
         finally
         {
             toolStripToDrag.ResumeCaputureMode();
         }
     }
     else
     {
         CurrentFeedbackRect.Move(screenLocation);
     }
 }
コード例 #2
0
 private void GiveToolStripPanelFeedback(ToolStrip toolStripToDrag, Point screenLocation)
 {
     if ((this.Orientation == System.Windows.Forms.Orientation.Horizontal) && (this.RightToLeft == RightToLeft.Yes))
     {
         screenLocation.Offset(-toolStripToDrag.Width, 0);
     }
     if (CurrentFeedbackRect == null)
     {
         CurrentFeedbackRect = new FeedbackRectangle(toolStripToDrag.ClientRectangle);
     }
     if (!CurrentFeedbackRect.Visible)
     {
         toolStripToDrag.SuspendCaputureMode();
         try
         {
             CurrentFeedbackRect.Show(screenLocation);
             toolStripToDrag.CaptureInternal = true;
         }
         finally
         {
             toolStripToDrag.ResumeCaputureMode();
         }
     }
     else
     {
         CurrentFeedbackRect.Move(screenLocation);
     }
 }