DragDrop event not fired but Over/Enter/Leave yes in RadForm

2 posts, 0 answers
  1. FMorales
    FMorales avatar
    31 posts
    Member since:
    Aug 2014

    Posted 22 Feb Link to this post

    Hi, 

    I am just trying to drag&drop a file from the desktop to a simple radForm but DragDrop event do not fired, others events as DragEnter/DragOver/DragLeave works without problems but I can not detect when the user perform drag&Drop with the file into the form.

    any idea why I can not catch this event?

    namespace Drag
    {
        partial class RadForm1
        {
            /// <summary>
            /// Required designer variable.
            /// </summary>
            private System.ComponentModel.IContainer components = null;
     
            /// <summary>
            /// Clean up any resources being used.
            /// </summary>
            /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
            protected override void Dispose(bool disposing)
            {
                if (disposing && (components != null))
                {
                    components.Dispose();
                }
                base.Dispose(disposing);
            }
     
            #region Windows Form Designer generated code
     
            /// <summary>
            /// Required method for Designer support - do not modify
            /// the contents of this method with the code editor.
            /// </summary>
            private void InitializeComponent()
            {
                this.visualStudio2012LightTheme1 = new Telerik.WinControls.Themes.VisualStudio2012LightTheme();
                ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
                this.SuspendLayout();
                //
                // RadForm1
                //
                this.AllowDrop = true;
                this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
                this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
                this.ClientSize = new System.Drawing.Size(643, 488);
                this.Margin = new System.Windows.Forms.Padding(4);
                this.Name = "RadForm1";
                //
                //
                //
                this.RootElement.ApplyShapeToControl = true;
                this.Text = "RadForm1";
                this.ThemeName = "VisualStudio2012Light";
                this.DragDrop += new System.Windows.Forms.DragEventHandler(this.RadForm1_DragDrop);
                this.DragEnter += new System.Windows.Forms.DragEventHandler(this.RadForm1_DragEnter);
                this.DragOver += new System.Windows.Forms.DragEventHandler(this.RadForm1_DragOver);
                ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
                this.ResumeLayout(false);
     
            }
     
            #endregion
     
            private Telerik.WinControls.Themes.VisualStudio2012LightTheme visualStudio2012LightTheme1;
        }
    }
     
    namespace Drag
    {
        partial class RadForm1
        {
            /// <summary>
            /// Required designer variable.
            /// </summary>
            private System.ComponentModel.IContainer components = null;
     
            /// <summary>
            /// Clean up any resources being used.
            /// </summary>
            /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
            protected override void Dispose(bool disposing)
            {
                if (disposing && (components != null))
                {
                    components.Dispose();
                }
                base.Dispose(disposing);
            }
     
            #region Windows Form Designer generated code
     
            /// <summary>
            /// Required method for Designer support - do not modify
            /// the contents of this method with the code editor.
            /// </summary>
            private void InitializeComponent()
            {
                this.visualStudio2012LightTheme1 = new Telerik.WinControls.Themes.VisualStudio2012LightTheme();
                ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
                this.SuspendLayout();
                //
                // RadForm1
                //
                this.AllowDrop = true;
                this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
                this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
                this.ClientSize = new System.Drawing.Size(643, 488);
                this.Margin = new System.Windows.Forms.Padding(4);
                this.Name = "RadForm1";
                //
                //
                //
                this.RootElement.ApplyShapeToControl = true;
                this.Text = "RadForm1";
                this.ThemeName = "VisualStudio2012Light";
                this.DragDrop += new System.Windows.Forms.DragEventHandler(this.RadForm1_DragDrop);
                this.DragEnter += new System.Windows.Forms.DragEventHandler(this.RadForm1_DragEnter);
                this.DragOver += new System.Windows.Forms.DragEventHandler(this.RadForm1_DragOver);
                ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
                this.ResumeLayout(false);
     
            }
     
            #endregion
     
            private Telerik.WinControls.Themes.VisualStudio2012LightTheme visualStudio2012LightTheme1;
        }
    }

     

    Thanks a lot.

    Francisco

  2. Dess
    Admin
    Dess avatar
    2107 posts

    Posted 22 Feb Link to this post

    Hello Francisco,

    Thank you for writing.  

    Following the provided information I have prepared a sample project for your reference. The DragEnter and DragDrop events are fired on my end as expected. Please refer to the attached gif file illustrating the behavior on my end. If you are still experiencing any further difficulties, feel free to modify it in a way to reproduce the experienced issue and get back to me with it so I can investigate the precise case. Thank you in advance. Additional information about the standard drag and drop functionality in WinForms is available here: https://msdn.microsoft.com/en-us/library/aa984430(v=vs.71).aspx

    I am looking forward to your reply.

    Regards,
    Dess
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top