Drag&drop a moving picture into another picture box
Drag&drop a moving picture into another picture box
Drag&drop a moving picture into another picture box
Drag&drop a moving picture into another picture box
Drag&drop a moving picture into another picture box
Drag&drop a moving picture into another picture box Drag&drop a moving picture into another picture box Drag&drop a moving picture into another picture box Drag&drop a moving picture into another picture box Drag&drop a moving picture into another picture box Drag&drop a moving picture into another picture box Drag&drop a moving picture into another picture box Drag&drop a moving picture into another picture box
Drag&drop a moving picture into another picture box Drag&drop a moving picture into another picture box
Drag&drop a moving picture into another picture box
Go Back  Xtreme Visual Basic Talk > > > Drag&drop a moving picture into another picture box


Reply
 
Thread Tools Display Modes
  #1  
Old 02-16-2011, 12:13 AM
floring floring is offline
Newcomer
 
Join Date: Mar 2010
Posts: 3
Default Drag&drop a moving picture into another picture box


Hello guys!

The code attached is interesting because the picture (letter A) is moving together with control box over the form. Take a look and tell me please, how to drop letter A into a white box.
Thank you!
Attached Files
File Type: zip Drag & drop picture.zip (4.5 KB, 18 views)
Reply With Quote
  #2  
Old 02-16-2011, 06:26 AM
Banjo's Avatar
BanjoDrag&drop a moving picture into another picture box Banjo is offline
Hell's Angel

Retired Moderator
* Guru *
 
Join Date: Jul 2001
Location: Yorkshire, UK
Posts: 10,394
Default

If I were being sarcastic then the answer would be: Left click on the "A", move the mouse until the A is over one of the white boxes and then release the button. Simples.

I'm guessing that's not what you mean. Perhaps you mean set the picture into one of the white boxes?
Code:
Private Sub pic_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) Dim i As Integer If Button = 1 Then mMove.EndIt ' Translate x and y from pic to form X = pic.Left + X Y = pic.Top + Y ' Find the target picturebox For i = Picture1.LBound To Picture1.UBound With Picture1(i) If X >= .Left And X <= .Left + .Width And _ Y >= .Top And Y <= .Top + .Height Then ' Copy the picture and hide the original Set Picture1(i).Picture = pic.Picture pic.Visible = False Exit For End If End With Next i End If End Sub
__________________
A wise one man once said "what you talking about dog breath"
Reply With Quote
  #3  
Old 02-16-2011, 09:04 AM
floring floring is offline
Newcomer
 
Join Date: Mar 2010
Posts: 3
Default

Thank you for help Banjo!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Drag&amp;drop a moving picture into another picture box
Drag&amp;drop a moving picture into another picture box
Drag&amp;drop a moving picture into another picture box Drag&amp;drop a moving picture into another picture box
Drag&amp;drop a moving picture into another picture box
Drag&amp;drop a moving picture into another picture box
Drag&amp;drop a moving picture into another picture box Drag&amp;drop a moving picture into another picture box Drag&amp;drop a moving picture into another picture box Drag&amp;drop a moving picture into another picture box Drag&amp;drop a moving picture into another picture box Drag&amp;drop a moving picture into another picture box Drag&amp;drop a moving picture into another picture box
Drag&amp;drop a moving picture into another picture box
Drag&amp;drop a moving picture into another picture box
 
Drag&amp;drop a moving picture into another picture box
Drag&amp;drop a moving picture into another picture box
 
-->