![]() |
Dragging and Dropping
Hi,
I'm wanting to create a drag and drop of picture frames. If I like have one picture frame and I want a Message Box to come up when it is positioned over the other Picture Box. Could someone please upload a project showing me how to do this or just the code if the picture boxes are called PBox1, PBox2 e.t.c. Many thanks! Matt Ireland |
http://www.vb-helper.com/howto_net_drag_drop.html
I doubt anyone will create a project and do all the coding, but you could use the example provided above and modify it. Besides the only way to learn is to do it yourself. |
Yeh - thanks. It was a bit stupid of me to get someone to do it for me. It takes all the fun out after all! I'll have a look and see how I get on. Thanks again for the link!
|
you might want to think twice about putting your email address in your sig, a spambot will eat that up.
|
Thanks for the advice. It's just I like people emailing me.
That must be why I've got increased spam. I'll monitor the sources. Thanks! |
Re: Dragging and Dropping
Can you find an drag and drop example of any control (in my case it text box or label) but in C#
Thanks |
Re: Dragging and Dropping
|
Re: Dragging and Dropping
Thanks friend I will check out and let you know if it did the trick
|
Re: Dragging and Dropping
Hey
Sadly I'm such a newbie that I couldn't use those examples (even when I tried to do it one by one). What I'm trying to do is very simple, I want to be a able do drag and drop a control (label) in my form. In the propriety of the form I enabled the allowDrag to true (I'm not sure what should be enable so I enabled the both the form and the control). Now I want on the event of enter (I think that the right event that I need to catch, I'm looking for the event that starts when I press on the control) I want to give the the control the same location of the mouse (with its X&Y locations) and here lies the problem. Let add me code: Quote:
Quote:
|
Re: Dragging and Dropping
This probably should have been in a new thread, beni, but since it's here...
Having your control, form, etc recognize drag-and-drop just means it will be alerted when the user tries to drag something onto it from somewhere else while it's running. As an example, imagine you have some picture-viewing software such as PMView running, and you drag an image file onto the program's window. It can then open up the file. WinZip can receive drag-and-drop notifications, and will respond by adding those files to an archive. Now, it seems what you're talking about is dragging controls onto a form while you're designing it. This is something different, and you don't need to adjust any of your control properties to allow this; rather, it's how a visual forms designer works. You can drag controls onto your form, move them around, and (depending on the control) resize them. Are you using the full version of Visual Studio? If so, what version? If not, what are you using? Perhaps you're using one of the express editions you can download free from Microsoft. |
| All times are GMT -5. The time now is 10:39 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC