コード例 #1
0
        private void DragOver(object sender, System.Windows.Forms.DragEventArgs e)
        {
            System.Drawing.Point point = new System.Drawing.Point(e.X, e.Y);
            point = (( Control )sender).PointToClient(point);

            DragDropInternal data = new DragDropInternal();

            DropEffectsArgs arg = new DropEffectsArgs(( DragDropInternal )e.Data.GetData(data.GetType()),
                                                      DragDropEffects.Copy, point.X, point.Y, e.KeyState);

            if (OnEffectsRequest != null)
            {
                OnEffectsRequest(sender, arg);
            }

            e.Effect = arg.Effects;
        }
コード例 #2
0
ファイル: CommonDragging.cs プロジェクト: ewosp/sycorax
 private void DragOver( object sender, System.Windows.Forms.DragEventArgs e )
 {                        
   System.Drawing.Point point = new System.Drawing.Point ( e.X, e.Y );
   point = ( ( Control )sender ).PointToClient( point );
     
   DragDropInternal data = new DragDropInternal();
     
   DropEffectsArgs arg = new DropEffectsArgs( ( DragDropInternal )e.Data.GetData( data.GetType() ), 
     DragDropEffects.Copy, point.X, point.Y, e.KeyState );
     
   if ( OnEffectsRequest != null )
   {
     OnEffectsRequest( sender, arg );
   }
     
   e.Effect = arg.Effects;
 }