![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
|
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 |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
|
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.
__________________
I have never let my schooling interfere with my education. -Mark Twain- Xbox live gamertag: melbolt |
|
|
|
|
|
#3 |
|
Hobbyist Programmer
|
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!
|
|
|
|
|
|
#4 |
|
Hobbyist Programmer
|
you might want to think twice about putting your email address in your sig, a spambot will eat that up.
__________________
I have never let my schooling interfere with my education. -Mark Twain- Xbox live gamertag: melbolt |
|
|
|
|
|
#5 |
|
Hobbyist Programmer
|
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! |
|
|
|
|
|
#6 |
|
Newbie
Join Date: Apr 2008
Posts: 19
Rep Power: 0
![]() |
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
__________________
NULL is all around me! |
|
|
|
|
|
#7 |
|
Hobbyist Programmer
|
Re: Dragging and Dropping
|
|
|
|
|
|
#8 |
|
Newbie
Join Date: Apr 2008
Posts: 19
Rep Power: 0
![]() |
Re: Dragging and Dropping
Thanks friend I will check out and let you know if it did the trick
__________________
NULL is all around me! |
|
|
|
|
|
#9 | ||
|
Newbie
Join Date: Apr 2008
Posts: 19
Rep Power: 0
![]() |
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:
__________________
NULL is all around me! Last edited by beni_dude; Apr 16th, 2008 at 11:07 AM. |
||
|
|
|
|
|
#10 |
|
Caffeinated Neural Net
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 864
Rep Power: 3
![]() |
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.
__________________
A man's knowledge is like an expanding sphere, the surface corresponding to the boundary between the known and the unknown. As the sphere grows, so does its surface; the more a man learns, the more he realizes how much he does not know. Hence, the most ignorant man thinks he knows it all. - L. Sprague de Camp |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|