Hi,
how can i simply retrieve an object passed throw an ole drag and drop in c#?
i explain :
i have a form with a treeview and i want to drag an item from it to a richTextBox
but i always receive a null!
in the mouse down event of the treView (i tried it in item drag event too) :
tv_generator.DoDragDrop(monObjCourant, DragDropEffects.Copy);
// monObjCourant is not null
in the DragDrop of the richTextView :
private void rtb_formule_DragDrop(object sender, System.Windows.Forms.DragEventArgs e) {
e.Effect = DragDropEffects.Copy;
string[] st = e.Data.GetFormats();
Boolean cond = e.Data.GetDataPresent(st[0]);
object c = e.Data.GetData(st[0]);
with this, cond is true but ... c is null
e contains an OleDataConverter in Data. my object is in it.
how can i do?
please help
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>86sdpxF5rUS8ngyjEwy2qg==</Id>