Windows Forms: Drag & Drop controls in C#
By FoxLearn 6/25/2017 4:48:41 PM 6.22K
How to Drag & Drop controls in C# using Control.Draggable library
Step 1: Click New Project, then select Visual C# on the left, then Windows and then select Windows Forms Application. Name your project "DraggableDemo" and then click OK
Step 2: Install Control.Draggable from nuget
Step 3: Design your form as below
Step 4: Add code to Form_Load event handler
private void Form1_Load(object sender, EventArgs e) { ControlExtension.Draggable(button1, true); ControlExtension.Draggable(textBox1, true); ControlExtension.Draggable(comboBox1, true); ControlExtension.Draggable(checkBox1, true); ControlExtension.Draggable(dataGridView1, true); ControlExtension.Draggable(progressBar1, true); }
VIDEO TUTORIALS
- Windows Forms: How to make an Application auto run on Windows startup in C#
- Windows Forms: Wait Form Dialog in C#
- How to create a Lucky Draw games in C#
- Windows Forms: Youtube Search with Paging in C#
- Windows Forms: Text to speech in C#
- Windows Forms: Print Picture Box in C#
- Windows Forms: Advanced Filter DataGridView in C#
- Windows Forms: Progress Bar in C#
Categories
Popular Posts
Visual Studio: Auto increment version
04/01/2024
What is ARM architecture?
04/01/2024