Expert Systan
Please see the code it is showing huge errors.
will you please see why so.

thanking you
anindya

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

//if (indexOfItemUnderMouseToDrop != ListBox.NoMatches)
//{
// // if the computed index is not within listBox2, then put it at the end (bottom)
// label1.Text = "\'" + e.Data.GetData(DataFormats.Text) + "\'" + " will be placed before item #" + (indexOfItemUnderMouseToDrop + 1) +
// "\n which is " + listBox2.SelectedItem;
// // pass the location back to use in the dragDrop event method.
// listBox2.SelectedIndex = indexOfItemUnderMouseToDrop;

//}
//else
//{
// // prompt the user where the drop will occur
// label1.Text = "\'" + e.Data.GetData(DataFormats.Text) + "\'" + " will be added to the bottom of the listBox.";
// // save the intended drop location as an index number into the listBox2 Item collection.
// listBox2.SelectedIndex = indexOfItemUnderMouseToDrop;
//}

//// if the MouseDown event set the DragDrop operation to be a move event
//// immediately delete the item. This has the desirable effect of
//// deleting any duplicate strings that might have been moved into
//// listBox2
//if (e.Effect == DragDropEffects.Move) // When moving an item within listBox2
// listBox2.Items.Remove((string)e.Data.GetData(DataFormats.Text));

Expert Systan
I will not be able to reply your suggestion now as I am from India and here it is 7.30 PM and my office is closing .
Tomorrow at 9.30 AM I will again come and then I will be able to reply to your suggestions.
Sorry for that .
Please do not think I am not responding to your suggestions for the time being .
Good night.
Thanking you
Anindya

I guess you did not put on the property events,
You should add this, if you did not put any of them
private void Form1_Load(object sender, EventArgs e)
{
listBox1.AllowDrop = true;
listBox2.AllowDrop = true;
}

Be sure also to put the events on listbox_dragenter, listbox_dragdrop, listbox_mousedown

Expert Systan
I am too happy to see the code you provided to me.
Yes you are correct that I had not put those instructions in the load events.
Thanking you for the responses you provided to me.

Expert Systan I have a request to you that is few days ago I put two questions on EE and then although many experts have replied but I am not getting the correct desired output .

Expert Systan if you can do a bit of devour to me then please put a glance upon those questions .
I am providing you the URLs of those questions and if you have a bit of free time please glance upon them.

Expert Systan
Thanks for the reply .
Hoping you will render me some more helps in future.
Actually I am a fresher so I do have a lot of queries and doubts .
I will be grateful if you provide me the same in future.
Thanking you ,
Take my regards,
Anindya Chatterjee
Bangalore
India

Featured Post

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.

The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database.
Open Services Panel:
Create a new connection using New Connection Wizard:
Create a test database called eetutorial:
Create a new test tabel called ee…