From: Norm on 29 Apr 2010 20:26 I have to admit I thought I would be able to find this question on Google Groups or Planet Source code, but after several hours of searching I have come up blank. Maybe I am not searching correctly. :-) I have found a lot of examples of drag and drop to a form, but none on how to drag and drop to an icon placed in the system tray. I really thought that just activating the OleDrop on the the form would allow me to drop files to the icon. Silly me for thinking it would be that simple. Can anyone point me in the direction I would have to go to get the drag and drop that works on the form to respond to the NotifyIcon. Thanks, Norm
From: Dee Earley on 30 Apr 2010 04:44 On 30/04/2010 01:26, Norm wrote: > I have to admit I thought I would be able to find this question on > Google Groups or Planet Source code, but after several hours of > searching I have come up blank. Maybe I am not searching correctly. :-) > > I have found a lot of examples of drag and drop to a form, but none on > how to drag and drop to an icon placed in the system tray. > > I really thought that just activating the OleDrop on the the form would > allow me to drop files to the icon. Silly me for thinking it would be > that simple. Can anyone point me in the direction I would have to go to > get the drag and drop that works on the form to respond to the NotifyIcon. I don't think this is possible. I've never seen any application that does it or seen any interfaces/APIs that would suggest it is possible. It won't use the forms properties as it's not tied to a form at all (beyond an hWnd to send messages to) -- Dee Earley (dee.earley(a)icode.co.uk) i-Catcher Development Team iCode Systems (Replies direct to my email address will be ignored. Please reply to the group.)
From: Shotgun Thom on 30 Apr 2010 11:10 Not sure if it's possible to drag a file to system tray icon. You can, however, drag a file to a desktop or taskbar icon to open if you have Command$ parsing in your program.
From: Nobody on 30 Apr 2010 12:01 I am not sure if this is possible, but the term used for this is "Drop Target". The easiest thing to do is to make a borderless form, say of a size of 32x32, or 64x64, and make it topmost. Add a right click popup menu so the user can exit from it(See "PopupMenu method" in MSDN). Another choice, is to create an icon on the desktop and make it a drop target, but this can be easily covered by other windows. Download "Shell Extensions", "Shell Extensions [FIX - Missing files]", and "OLELIB.TLB - OLE interfaces & functions v1.7" files below. This install many shell extension samples, including a desktop icon acting as a drop target called "Edanmo's File Shredder". When you drop files on it, it prompts you if you really want to delete the files. This works like the Recycle Bin. Namespace Edanmo - Visual Basic 6 http://www.mvps.org/emorcillo/en/code/vb6/index.shtml
From: Dee Earley on 30 Apr 2010 12:29 On 30/04/2010 09:44, Dee Earley wrote: > On 30/04/2010 01:26, Norm wrote: >> I have to admit I thought I would be able to find this question on >> Google Groups or Planet Source code, but after several hours of >> searching I have come up blank. Maybe I am not searching correctly. :-) >> >> I have found a lot of examples of drag and drop to a form, but none on >> how to drag and drop to an icon placed in the system tray. >> >> I really thought that just activating the OleDrop on the the form would >> allow me to drop files to the icon. Silly me for thinking it would be >> that simple. Can anyone point me in the direction I would have to go to >> get the drag and drop that works on the form to respond to the >> NotifyIcon. > > I don't think this is possible. > > I've never seen any application that does it or seen any interfaces/APIs > that would suggest it is possible. > > It won't use the forms properties as it's not tied to a form at all > (beyond an hWnd to send messages to) This is also kinda backed up by the "show hidden icons" not being activated when you drag over it (on route to dropping on a hidden icon) -- Dee Earley (dee.earley(a)icode.co.uk) i-Catcher Development Team iCode Systems (Replies direct to my email address will be ignored. Please reply to the group.)
|
Next
|
Last
Pages: 1 2 Prev: Mystery 3 Surfaces Again Next: How do I find out how wide the form's border is |