473,405 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Drag/Drop custom controls

Hi,

My goal is to have a series of thumbnail images on a control/panel and to
drag/drop those items onto another control (i.e. a treeview). I am able to
drag one item and need to somehow select more than one thumbnail image. I
would like to use the Control key/Left Mouse Click to select more than one
item. Unfortunately, the picturebox control doesn't seem to have a
mouse-based click event that shows if the control key is pressed.

Is there a control or code out there that will allow me to do what I'm
trying to do? If not, does anybody have any advice for what I should try?

Thanks,
cj
Nov 16 '05 #1
1 2922
It's conveniently hidden, but I think that you just want to check
Control.ModifierKeys. This is a static property that is a member of Control
class. This example code is copy/pasted directly from the Control.Modifiers
help:

private void button1_Click(object sender, System.EventArgs e)
{
/* If the CTRL key is pressed when the
* control is clicked, hide the control. */
if(Control.ModifierKeys == Keys.Control)
{
((Control)sender).Hide();
}
}

"Curtis Justus" <su**@you.wont.spam.me.org> wrote in message
news:uZ*************@tk2msftngp13.phx.gbl...
Hi,

My goal is to have a series of thumbnail images on a control/panel and to
drag/drop those items onto another control (i.e. a treeview). I am able to drag one item and need to somehow select more than one thumbnail image. I
would like to use the Control key/Left Mouse Click to select more than one
item. Unfortunately, the picturebox control doesn't seem to have a
mouse-based click event that shows if the control key is pressed.

Is there a control or code out there that will allow me to do what I'm
trying to do? If not, does anybody have any advice for what I should try?

Thanks,
cj

Nov 16 '05 #2

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

Similar topics

1
by: VR | last post by:
I am trying to use a custom cursor during drag-drop operation between 2 ListViews. So, I have a code that at the time GiveFeedback() is called creates a new cursor based on the icon and text of...
2
by: SamSpade | last post by:
There seems to be two ways to put things on the clipboard ( I don't mean different formats): SetClipboardData and OleSetClipboard If I want to get data off the clipboard do I care how it was put...
3
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== ...
1
by: Greg | last post by:
I have a custom control called PageBanner which is compiled into a DLL and then put into the toolbox. It shows like I would expect it to in the toolbox, and I can drag and drop it onto a form. ...
1
by: Marcel | last post by:
hello, I´m trying to do a drag and drop operation and drag the control, just like a windows icon, is that possible? my control is a custom form, so I detect the mouseDown event and call...
0
by: Dave | last post by:
I'm creating a custom control. To start, I created the control in a seperate project in the same solution. I didn't change anything from the template vs.net creates for a web custom control, I...
0
by: Oberon | last post by:
How do I navigate through records using drag 'n' drop controls? I have an example in C# for Windows forms that relies on BindingContext but this is not available for ASP.NET. How do I solve that...
3
by: James Radke | last post by:
Hello, I was curious, is it possible to create drag and drop interface from listbox to listbox on a webform application (i.e. vb.net)? Basically the application would need to load multiple...
0
by: DrBonzo | last post by:
I've inherited a body of C# code that has a 'Designer Host' (DH) based UI. Custom controls are selected from a 'toolbox' window and placed/sized in the DH interface. I'm trying to add a feature...
0
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 ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.