Question Short cuts in app.

ecoster

Member
Joined
Sep 11, 2011
Messages
6
Programming Experience
1-3
Hi,

I've been looking for a way to copy desktop short cuts to A app without any success.
Is their A way to drag or copy the short cuts to the form and execute on click.
I don't know where to start here so any suggestions on how to go about this would be greatly appreciated.

Gr,
ecoster
 
You would have to implement drag and drop in your form to detect a shortcut being dropped. You'd then have to process the dropped data to store it locally in a way that it can be used by your app.

You should start by reading up about drag and drop in Windows Forms in general. It's all done basically the same way regardless of the source, the data and target, so you can practice by doing things like dragging text between TextBoxes and items between ListBoxes. Once you've got the hang of that, you can then start playing with data dragged into your app from external sources. Finally, you can tune it to work with shortcuts specifically. You can ask any specific questions you may have along the way.
 
Thanks for the quick reply.
The drag and drop isn't the problem that was just to clarify the thing I'm trying to achieve.
The thing I'm having problems with is the data, how do I show it and make it selectable to run the exe.
 
That's up to you. You can't actually display a Windows shortcut in your app so you have to decide what you do want to display. Maybe a PictureBox and handle its Click event, then call Process.Start.
 
Back
Top