473,569 Members | 2,760 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Confused about Drag/Drop

There seems to be two ways to put things on the clipboard ( I don't mean
different formats): SetClipboardDat a and OleSetClipboard

If I want to get data off the clipboard do I care how it was put there?

What about Drag/Drop; is there more than one way for the source to make data
available
Is it always OLE?

What's the relationship between WM_DROPFILES and HDROP. I think HDROP is
the OLE way.
But can I get the data using either or do I have to know what the source
did?

The bottom line is, if there are two ways and, as an example, I drag from
Word (or the Shell) to my app
how does the app know which way to extract it?
Thanks
Nov 16 '05 #1
2 4311
Hi
you can use DoDragDrop, look at this sample source It is a widows
application , try to put it in a project and look at it. i hope it helps
using System;
using System.Drawing;
using System.Windows. Forms;

namespace Snip_DragNDrop
{
public class Form1 : System.Windows. Forms.Form
{
private System.Windows. Forms.ListBox ListDragSource;
private System.Windows. Forms.ListBox ListDragTarget;
private System.Windows. Forms.CheckBox UseCustomCursor sCheck;
private System.Windows. Forms.Label DropLocationLab el;

private int indexOfItemUnde rMouseToDrag;
private int indexOfItemUnde rMouseToDrop;

private Rectangle dragBoxFromMous eDown;
private Point screenOffset;

private Cursor MyNoDropCursor;
private Cursor MyNormalCursor;

/// The main entry point for the application.
[STAThread]
static void Main()
{
Application.Run (new Form1());
}

public Form1()
{
this.ListDragSo urce = new System.Windows. Forms.ListBox() ;
this.ListDragTa rget = new System.Windows. Forms.ListBox() ;
this.UseCustomC ursorsCheck = new System.Windows. Forms.CheckBox( );
this.DropLocati onLabel = new System.Windows. Forms.Label();

this.SuspendLay out();

// ListDragSource
this.ListDragSo urce.AllowDrop = true;
this.ListDragSo urce.Items.AddR ange(new object[] {"one", "two", "three",
"four",
"five", "six", "seven", "eight",
"nine", "ten"});
this.ListDragSo urce.Location = new System.Drawing. Point(10, 17);
this.ListDragSo urce.Size = new System.Drawing. Size(120, 225);
this.ListDragSo urce.MouseDown += new
System.Windows. Forms.MouseEven tHandler(this.L istDragSource_M ouseDown);
this.ListDragSo urce.QueryConti nueDrag += new
System.Windows. Forms.QueryCont inueDragEventHa ndler(this.List DragSource_Quer y
ContinueDrag);
this.ListDragSo urce.MouseUp += new
System.Windows. Forms.MouseEven tHandler(this.L istDragSource_M ouseUp);
this.ListDragSo urce.MouseMove += new
System.Windows. Forms.MouseEven tHandler(this.L istDragSource_M ouseMove);
this.ListDragSo urce.GiveFeedba ck += new
System.Windows. Forms.GiveFeedb ackEventHandler (this.ListDragS ource_GiveFeedb a
ck);
this.ListDragSo urce.DragDrop += new
System.Windows. Forms.DragEvent Handler(this.Li stDragTarget_Dr agDrop);
// ListDragTarget
this.ListDragTa rget.AllowDrop = true;
this.ListDragTa rget.Location = new System.Drawing. Point(154, 17);
this.ListDragTa rget.Size = new System.Drawing. Size(120, 225);
//this.ListDragTa rget.DragOver += new
System.Windows. Forms.DragEvent Handler(this.Li stDragTarget_Dr agOver);
this.ListDragTa rget.DragDrop += new
System.Windows. Forms.DragEvent Handler(this.Li stDragTarget_Dr agDrop);
this.ListDragTa rget.DragEnter += new
System.Windows. Forms.DragEvent Handler(this.Li stDragTarget_Dr agEnter);
//this.ListDragTa rget.DragLeave += new
System.EventHan dler(this.ListD ragTarget_DragL eave);

// UseCustomCursor sCheck
this.UseCustomC ursorsCheck.Loc ation = new System.Drawing. Point(10, 243);
this.UseCustomC ursorsCheck.Siz e = new System.Drawing. Size(137, 24);
this.UseCustomC ursorsCheck.Tex t = "Use Custom Cursors";

// DropLocationLab el
this.DropLocati onLabel.Locatio n = new System.Drawing. Point(154, 245);
this.DropLocati onLabel.Size = new System.Drawing. Size(137, 24);
this.DropLocati onLabel.Text = "None";

// Form1
this.AutoScaleB aseSize = new System.Drawing. Size(5, 13);
this.ClientSize = new System.Drawing. Size(292, 270);
this.Controls.A ddRange(new System.Windows. Forms.Control[]
{this.ListDragS ource,
this.ListDragTa rget, this.UseCustomC ursorsCheck,
this.DropLocati onLabel});
this.Text = "Drag and Drop Example";

this.ResumeLayo ut(false);

}

private void ListDragSource_ MouseDown(objec t sender,
System.Windows. Forms.MouseEven tArgs e)
{
// Get the index of the item the mouse is below.
indexOfItemUnde rMouseToDrag = ListDragSource. IndexFromPoint( e.X, e.Y);

if (indexOfItemUnd erMouseToDrag != ListBox.NoMatch es)
{

// Remember the point where the mouse down occurred. The DragSize
indicates
// the size that the mouse can move before a drag event should be
started.
Size dragSize = SystemInformati on.DragSize;

// Create a rectangle using the DragSize, with the mouse position being
// at the center of the rectangle.
dragBoxFromMous eDown = new Rectangle(new Point(e.X - (dragSize.Width
/2),
e.Y - (dragSize.Heigh t /2)), dragSize);
}
else
// Reset the rectangle if the mouse is not over an item in the ListBox.
dragBoxFromMous eDown = Rectangle.Empty ;

}

private void ListDragSource_ MouseUp(object sender,
System.Windows. Forms.MouseEven tArgs e)
{
// Reset the drag rectangle when the mouse button is raised.
dragBoxFromMous eDown = Rectangle.Empty ;
}

private void ListDragSource_ MouseMove(objec t sender,
System.Windows. Forms.MouseEven tArgs e)
{

if ((e.Button & MouseButtons.Le ft) == MouseButtons.Le ft)
{

// If the mouse moves outside the rectangle, start the drag.
if (dragBoxFromMou seDown != Rectangle.Empty &&
!dragBoxFromMou seDown.Contains (e.X, e.Y))
{

// Create custom cursors for the drag-and-drop operation.
try
{
MyNormalCursor = new Cursor("3dwarro .cur");
MyNoDropCursor = new Cursor("3dwno.c ur");

}
catch
{
// An error occurred while attempting to load the cursors, so use
// standard cursors.
UseCustomCursor sCheck.Checked = false;
}
finally
{

// The screenOffset is used to account for any desktop bands
// that may be at the top or left side of the screen when
// determining when to cancel the drag drop operation.
screenOffset = SystemInformati on.WorkingArea. Location;

// Proceed with the drag and drop, passing in the list item.

DragDropEffects dropEffect =
ListDragSource. DoDragDrop(List DragSource.Item s[indexOfItemUnde rMouseToDrag],
DragDropEffects .All | DragDropEffects .Link);

// If the drag operation was a move then remove the item.
if (dropEffect == DragDropEffects .Move)
{
ListDragSource. Items.RemoveAt( indexOfItemUnde rMouseToDrag);

// Selects the previous item in the list as long as the list has an
item.
if (indexOfItemUnd erMouseToDrag > 0)
ListDragSource. SelectedIndex = indexOfItemUnde rMouseToDrag -1;

else if (ListDragSource .Items.Count > 0)
// Selects the first item.
ListDragSource. SelectedIndex =0;
}

// Dispose of the cursors since they are no longer needed.
if (MyNormalCursor != null)
MyNormalCursor. Dispose();

if (MyNoDropCursor != null)
MyNoDropCursor. Dispose();
}
}
}
}
private void ListDragSource_ GiveFeedback(ob ject sender,
System.Windows. Forms.GiveFeedb ackEventArgs e)
{
// Use custom cursors if the check box is checked.
if (UseCustomCurso rsCheck.Checked )
{

// Sets the custom cursor based upon the effect.
e.UseDefaultCur sors = false;
if ((e.Effect & DragDropEffects .Move) == DragDropEffects .Move)
Cursor.Current = MyNormalCursor;
else
Cursor.Current = MyNoDropCursor;
}

}
private void ListDragTarget_ DragOver(object sender,
System.Windows. Forms.DragEvent Args e)
{

// Determine whether string data exists in the drop data. If not, then
// the drop effect reflects that the drop cannot occur.
if (!e.Data.GetDat aPresent(typeof (System.String) ))
{

e.Effect = DragDropEffects .None;
DropLocationLab el.Text = "None - no string data.";
return;
}

// Set the effect based upon the KeyState.
if ((e.KeyState & (8+32)) == (8+32) &&
(e.AllowedEffec t & DragDropEffects .Link) == DragDropEffects .Link)
{
// KeyState 8 + 32 = CTL + ALT

// Link drag and drop effect.
e.Effect = DragDropEffects .Link;

}
else if ((e.KeyState & 32) == 32 &&
(e.AllowedEffec t & DragDropEffects .Link) == DragDropEffects .Link)
{

// ALT KeyState for link.
e.Effect = DragDropEffects .Link;

}
else if ((e.KeyState & 4) == 4 &&
(e.AllowedEffec t & DragDropEffects .Move) == DragDropEffects .Move)
{

// SHIFT KeyState for move.
e.Effect = DragDropEffects .Move;

}
else if ((e.KeyState & 8) == 8 &&
(e.AllowedEffec t & DragDropEffects .Copy) == DragDropEffects .Copy)
{

// CTL KeyState for copy.
e.Effect = DragDropEffects .Copy;

}
else if ((e.AllowedEffe ct & DragDropEffects .Move) ==
DragDropEffects .Move)
{

// By default, the drop action should be move, if allowed.
e.Effect = DragDropEffects .Move;

}
else
e.Effect = DragDropEffects .None;

// Get the index of the item the mouse is below.

// The mouse locations are relative to the screen, so they must be
// converted to client coordinates.

indexOfItemUnde rMouseToDrop =
ListDragTarget. IndexFromPoint( ListDragTarget. PointToClient(n ew
Point(e.X, e.Y)));

// Updates the label text.
if (indexOfItemUnd erMouseToDrop != ListBox.NoMatch es)
{

DropLocationLab el.Text = "Drops before item #" +
(indexOfItemUnd erMouseToDrop + 1);
}
else
DropLocationLab el.Text = "Drops at the end.";

}
private void ListDragTarget_ DragDrop(object sender,
System.Windows. Forms.DragEvent Args e)
{
// Ensure that the list item index is contained in the data.
if (e.Data.GetData Present(typeof( System.String)) )
{

Object item = (object)e.Data. GetData(typeof( System.String)) ;

// Perform drag and drop, depending upon the effect.
if (e.Effect == DragDropEffects .Copy ||
e.Effect == DragDropEffects .Move)
{

// Insert the item.
if (indexOfItemUnd erMouseToDrop != ListBox.NoMatch es)
ListDragTarget. Items.Insert(in dexOfItemUnderM ouseToDrop, item);
else
ListDragTarget. Items.Add(item) ;

}
}
// Reset the label text.
DropLocationLab el.Text = "None";
}
private void ListDragSource_ QueryContinueDr ag(object sender,
System.Windows. Forms.QueryCont inueDragEventAr gs e)
{
// Cancel the drag if the mouse moves off the form.
ListBox lb = sender as ListBox;

if (lb != null)
{

Form f = lb.FindForm();

// Cancel the drag if the mouse moves off the form. The screenOffset
// takes into account any desktop bands that may be at the top or left
// side of the screen.
if (((Control.Mous ePosition.X - screenOffset.X) < f.DesktopBounds .Left)
||
((Control.Mouse Position.X - screenOffset.X) > f.DesktopBounds .Right) ||
((Control.Mouse Position.Y - screenOffset.Y) < f.DesktopBounds .Top) ||
((Control.Mouse Position.Y - screenOffset.Y) > f.DesktopBounds .Bottom))
{

e.Action = DragAction.Canc el;
}
}
}
private void ListDragTarget_ DragEnter(objec t sender,
System.Windows. Forms.DragEvent Args e)
{
// Reset the label text.
DropLocationLab el.Text = "None";
}
private void ListDragTarget_ DragLeave(objec t sender, System.EventArg s e)
{
// Reset the label text.
DropLocationLab el.Text = "None";
}
}
}
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC

Nov 16 '05 #2
Thanks, I've copied your post and saved it to study after I close this.

But I hope someone answers the questions I asked in my post.

I'm confused about the interplay of the different options.

Are they really different or is just the UI different?
Thanks again
"Mohamoss" <mo************ @egdsc.microsof t.com> wrote in message
news:xe******** ******@cpmsftng xa10.phx.gbl...
Hi
you can use DoDragDrop, look at this sample source It is a widows
application , try to put it in a project and look at it. i hope it helps
using System;
using System.Drawing;
using System.Windows. Forms;

namespace Snip_DragNDrop
{
public class Form1 : System.Windows. Forms.Form
{
private System.Windows. Forms.ListBox ListDragSource;
private System.Windows. Forms.ListBox ListDragTarget;
private System.Windows. Forms.CheckBox UseCustomCursor sCheck;
private System.Windows. Forms.Label DropLocationLab el;

private int indexOfItemUnde rMouseToDrag;
private int indexOfItemUnde rMouseToDrop;

private Rectangle dragBoxFromMous eDown;
private Point screenOffset;

private Cursor MyNoDropCursor;
private Cursor MyNormalCursor;

/// The main entry point for the application.
[STAThread]
static void Main()
{
Application.Run (new Form1());
}

public Form1()
{
this.ListDragSo urce = new System.Windows. Forms.ListBox() ;
this.ListDragTa rget = new System.Windows. Forms.ListBox() ;
this.UseCustomC ursorsCheck = new System.Windows. Forms.CheckBox( );
this.DropLocati onLabel = new System.Windows. Forms.Label();

this.SuspendLay out();

// ListDragSource
this.ListDragSo urce.AllowDrop = true;
this.ListDragSo urce.Items.AddR ange(new object[] {"one", "two", "three",
"four",
"five", "six", "seven", "eight",
"nine", "ten"});
this.ListDragSo urce.Location = new System.Drawing. Point(10, 17);
this.ListDragSo urce.Size = new System.Drawing. Size(120, 225);
this.ListDragSo urce.MouseDown += new
System.Windows. Forms.MouseEven tHandler(this.L istDragSource_M ouseDown);
this.ListDragSo urce.QueryConti nueDrag += new
System.Windows. Forms.QueryCont inueDragEventHa ndler(this.List DragSource_Quer y ContinueDrag);
this.ListDragSo urce.MouseUp += new
System.Windows. Forms.MouseEven tHandler(this.L istDragSource_M ouseUp);
this.ListDragSo urce.MouseMove += new
System.Windows. Forms.MouseEven tHandler(this.L istDragSource_M ouseMove);
this.ListDragSo urce.GiveFeedba ck += new
System.Windows. Forms.GiveFeedb ackEventHandler (this.ListDragS ource_GiveFeedb a ck);
this.ListDragSo urce.DragDrop += new
System.Windows. Forms.DragEvent Handler(this.Li stDragTarget_Dr agDrop);
// ListDragTarget
this.ListDragTa rget.AllowDrop = true;
this.ListDragTa rget.Location = new System.Drawing. Point(154, 17);
this.ListDragTa rget.Size = new System.Drawing. Size(120, 225);
//this.ListDragTa rget.DragOver += new
System.Windows. Forms.DragEvent Handler(this.Li stDragTarget_Dr agOver);
this.ListDragTa rget.DragDrop += new
System.Windows. Forms.DragEvent Handler(this.Li stDragTarget_Dr agDrop);
this.ListDragTa rget.DragEnter += new
System.Windows. Forms.DragEvent Handler(this.Li stDragTarget_Dr agEnter);
//this.ListDragTa rget.DragLeave += new
System.EventHan dler(this.ListD ragTarget_DragL eave);

// UseCustomCursor sCheck
this.UseCustomC ursorsCheck.Loc ation = new System.Drawing. Point(10, 243);
this.UseCustomC ursorsCheck.Siz e = new System.Drawing. Size(137, 24);
this.UseCustomC ursorsCheck.Tex t = "Use Custom Cursors";

// DropLocationLab el
this.DropLocati onLabel.Locatio n = new System.Drawing. Point(154, 245);
this.DropLocati onLabel.Size = new System.Drawing. Size(137, 24);
this.DropLocati onLabel.Text = "None";

// Form1
this.AutoScaleB aseSize = new System.Drawing. Size(5, 13);
this.ClientSize = new System.Drawing. Size(292, 270);
this.Controls.A ddRange(new System.Windows. Forms.Control[]
{this.ListDragS ource,
this.ListDragTa rget, this.UseCustomC ursorsCheck,
this.DropLocati onLabel});
this.Text = "Drag and Drop Example";

this.ResumeLayo ut(false);

}

private void ListDragSource_ MouseDown(objec t sender,
System.Windows. Forms.MouseEven tArgs e)
{
// Get the index of the item the mouse is below.
indexOfItemUnde rMouseToDrag = ListDragSource. IndexFromPoint( e.X, e.Y);

if (indexOfItemUnd erMouseToDrag != ListBox.NoMatch es)
{

// Remember the point where the mouse down occurred. The DragSize
indicates
// the size that the mouse can move before a drag event should be
started.
Size dragSize = SystemInformati on.DragSize;

// Create a rectangle using the DragSize, with the mouse position being
// at the center of the rectangle.
dragBoxFromMous eDown = new Rectangle(new Point(e.X - (dragSize.Width
/2),
e.Y - (dragSize.Heigh t /2)), dragSize);
}
else
// Reset the rectangle if the mouse is not over an item in the ListBox.
dragBoxFromMous eDown = Rectangle.Empty ;

}

private void ListDragSource_ MouseUp(object sender,
System.Windows. Forms.MouseEven tArgs e)
{
// Reset the drag rectangle when the mouse button is raised.
dragBoxFromMous eDown = Rectangle.Empty ;
}

private void ListDragSource_ MouseMove(objec t sender,
System.Windows. Forms.MouseEven tArgs e)
{

if ((e.Button & MouseButtons.Le ft) == MouseButtons.Le ft)
{

// If the mouse moves outside the rectangle, start the drag.
if (dragBoxFromMou seDown != Rectangle.Empty &&
!dragBoxFromMou seDown.Contains (e.X, e.Y))
{

// Create custom cursors for the drag-and-drop operation.
try
{
MyNormalCursor = new Cursor("3dwarro .cur");
MyNoDropCursor = new Cursor("3dwno.c ur");

}
catch
{
// An error occurred while attempting to load the cursors, so use
// standard cursors.
UseCustomCursor sCheck.Checked = false;
}
finally
{

// The screenOffset is used to account for any desktop bands
// that may be at the top or left side of the screen when
// determining when to cancel the drag drop operation.
screenOffset = SystemInformati on.WorkingArea. Location;

// Proceed with the drag and drop, passing in the list item.

DragDropEffects dropEffect =
ListDragSource. DoDragDrop(List DragSource.Item s[indexOfItemUnde rMouseToDrag], DragDropEffects .All | DragDropEffects .Link);

// If the drag operation was a move then remove the item.
if (dropEffect == DragDropEffects .Move)
{
ListDragSource. Items.RemoveAt( indexOfItemUnde rMouseToDrag);

// Selects the previous item in the list as long as the list has an
item.
if (indexOfItemUnd erMouseToDrag > 0)
ListDragSource. SelectedIndex = indexOfItemUnde rMouseToDrag -1;

else if (ListDragSource .Items.Count > 0)
// Selects the first item.
ListDragSource. SelectedIndex =0;
}

// Dispose of the cursors since they are no longer needed.
if (MyNormalCursor != null)
MyNormalCursor. Dispose();

if (MyNoDropCursor != null)
MyNoDropCursor. Dispose();
}
}
}
}
private void ListDragSource_ GiveFeedback(ob ject sender,
System.Windows. Forms.GiveFeedb ackEventArgs e)
{
// Use custom cursors if the check box is checked.
if (UseCustomCurso rsCheck.Checked )
{

// Sets the custom cursor based upon the effect.
e.UseDefaultCur sors = false;
if ((e.Effect & DragDropEffects .Move) == DragDropEffects .Move)
Cursor.Current = MyNormalCursor;
else
Cursor.Current = MyNoDropCursor;
}

}
private void ListDragTarget_ DragOver(object sender,
System.Windows. Forms.DragEvent Args e)
{

// Determine whether string data exists in the drop data. If not, then
// the drop effect reflects that the drop cannot occur.
if (!e.Data.GetDat aPresent(typeof (System.String) ))
{

e.Effect = DragDropEffects .None;
DropLocationLab el.Text = "None - no string data.";
return;
}

// Set the effect based upon the KeyState.
if ((e.KeyState & (8+32)) == (8+32) &&
(e.AllowedEffec t & DragDropEffects .Link) == DragDropEffects .Link)
{
// KeyState 8 + 32 = CTL + ALT

// Link drag and drop effect.
e.Effect = DragDropEffects .Link;

}
else if ((e.KeyState & 32) == 32 &&
(e.AllowedEffec t & DragDropEffects .Link) == DragDropEffects .Link)
{

// ALT KeyState for link.
e.Effect = DragDropEffects .Link;

}
else if ((e.KeyState & 4) == 4 &&
(e.AllowedEffec t & DragDropEffects .Move) == DragDropEffects .Move)
{

// SHIFT KeyState for move.
e.Effect = DragDropEffects .Move;

}
else if ((e.KeyState & 8) == 8 &&
(e.AllowedEffec t & DragDropEffects .Copy) == DragDropEffects .Copy)
{

// CTL KeyState for copy.
e.Effect = DragDropEffects .Copy;

}
else if ((e.AllowedEffe ct & DragDropEffects .Move) ==
DragDropEffects .Move)
{

// By default, the drop action should be move, if allowed.
e.Effect = DragDropEffects .Move;

}
else
e.Effect = DragDropEffects .None;

// Get the index of the item the mouse is below.

// The mouse locations are relative to the screen, so they must be
// converted to client coordinates.

indexOfItemUnde rMouseToDrop =
ListDragTarget. IndexFromPoint( ListDragTarget. PointToClient(n ew
Point(e.X, e.Y)));

// Updates the label text.
if (indexOfItemUnd erMouseToDrop != ListBox.NoMatch es)
{

DropLocationLab el.Text = "Drops before item #" +
(indexOfItemUnd erMouseToDrop + 1);
}
else
DropLocationLab el.Text = "Drops at the end.";

}
private void ListDragTarget_ DragDrop(object sender,
System.Windows. Forms.DragEvent Args e)
{
// Ensure that the list item index is contained in the data.
if (e.Data.GetData Present(typeof( System.String)) )
{

Object item = (object)e.Data. GetData(typeof( System.String)) ;

// Perform drag and drop, depending upon the effect.
if (e.Effect == DragDropEffects .Copy ||
e.Effect == DragDropEffects .Move)
{

// Insert the item.
if (indexOfItemUnd erMouseToDrop != ListBox.NoMatch es)
ListDragTarget. Items.Insert(in dexOfItemUnderM ouseToDrop, item);
else
ListDragTarget. Items.Add(item) ;

}
}
// Reset the label text.
DropLocationLab el.Text = "None";
}
private void ListDragSource_ QueryContinueDr ag(object sender,
System.Windows. Forms.QueryCont inueDragEventAr gs e)
{
// Cancel the drag if the mouse moves off the form.
ListBox lb = sender as ListBox;

if (lb != null)
{

Form f = lb.FindForm();

// Cancel the drag if the mouse moves off the form. The screenOffset
// takes into account any desktop bands that may be at the top or left
// side of the screen.
if (((Control.Mous ePosition.X - screenOffset.X) < f.DesktopBounds .Left)
||
((Control.Mouse Position.X - screenOffset.X) > f.DesktopBounds .Right) ||
((Control.Mouse Position.Y - screenOffset.Y) < f.DesktopBounds .Top) ||
((Control.Mouse Position.Y - screenOffset.Y) > f.DesktopBounds .Bottom))
{

e.Action = DragAction.Canc el;
}
}
}
private void ListDragTarget_ DragEnter(objec t sender,
System.Windows. Forms.DragEvent Args e)
{
// Reset the label text.
DropLocationLab el.Text = "None";
}
private void ListDragTarget_ DragLeave(objec t sender, System.EventArg s e)
{
// Reset the label text.
DropLocationLab el.Text = "None";
}
}
}
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2591
by: Lauren Quantrell | last post by:
I'm trying to drop a file from Windows Explorer (or desktop, etc.) onto a field in Access2K and capture the full file path. I found an posting below that says this is possible but I cannot simutate it. Can anyone help? Thanks ************************** previous post: Message 1 in thread
3
10395
by: Ajay Krishnan Thampi | last post by:
I have a slight problem implementing 'drag and drop' from a datagrid to a tree-view. I have pasted my code below. Someone please advice me on what to do...pretty blur right now. ==code== using System; using System.Drawing; using System.Collections; using System.ComponentModel;
2
2046
by: Daniel | last post by:
I'm new to .Net and all of its abilities so I hope this makes sense. Basically I'm confused on when is the appropriate time to use web forms controls vs. regular HTML. For example in ASP (non-.Net) if I wanted to fill a list it may look something like this: -------START CODE <%
6
3537
by: jojobar | last post by:
Hello, I look at the asp.net 2.0 web parts tutorial on the asp.net web site. I tried to run it under firefox browser but it did not run. If I want to use this feature in a commercial product where the user can run on firefox/mozilla, what would be a good approach. 1. Should I overwrite the javascript code drag-and-drop to make it more...
0
918
by: SamSpade | last post by:
There seems to be two ways to put things on the clipboard: SetClipboardData and OleSetClipboard If I want to get data off the clipboard do I care how it was put there? What about Drag/Drop; is there more than one way for the source to make data available? Is it always OLE? What's the relationship between WM_DROPFILES and HDROP. I...
3
10578
by: VB Programmer | last post by:
In VB.NET 2005 (winform) any sample code to drag & drop items between 2 listboxes? Thanks!
1
4699
by: Darren | last post by:
I'm trying to create a file using drag and drop. I want to be able to select a listview item drag it to the shell and create a file. Each icon in the listview represents a blob in a database. When I drop onto the shell I want a file created with a specified name containing the data from the database. I've looked at the FileDrop format but it...
0
2477
by: RHSFSS | last post by:
Hi, I have a Drag and Drop registration problem (See http://www.thescripts.com/forum/thread434707.html for similar problem post), can anyone out thereadvise on the best solution? I have a .NET 2.0 application (actually in C#) called from a third party piece of software via VBScript. The VB script passes an object as a parameter which my...
5
13753
by: Romulo NF | last post by:
Greetings, I´m back here to show the new version of the drag & drop table columns (original script ). I´ve found some issues with the old script, specially when trying to use 2 tables with drag&drop on the same page (which was not possible). Now i´ve a new concept of the script, more object oriented. I´ve also commented the whole code so you...
0
7931
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7684
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7985
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6298
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5234
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3666
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3659
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1230
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
959
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.