473,396 Members | 1,866 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,396 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 2921
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
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,...

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.