Print Page | Close Window

Dragable Picture Boxes

Printed From: Mirage Source
Category: Tutorials
Forum Name: Temporary Archive (Read Only)
Forum Discription: Temporary 3.0.3 archive tutorials, will be deleted when converted.
URL: http://ms.shannaracorp.com/backup-forums/forum_posts.asp?TID=131
Printed Date: 20 December 2006 at 5:52pm
Software Version: Web Wiz Forums 8.01 - http://www.webwizforums.com


Topic: Dragable Picture Boxes
Posted By: Sync
Subject: Dragable Picture Boxes
Date Posted: 11 February 2006 at 2:40pm
Difficulty: Easy 1/5

Original Posted By: Takeshi

Dragable Pictureboxes
 
Heres how to make your pictureboxes dragable... an example of how this could work, is on your Inventory picturebox, you could make the client user able to click+drag it around the form...

I'm only going to show you how to make one picturebox movable (picPlayerSpells), you'll have to copy+edit the code for the other pictureboxes

Open frmMirage and add this to the end...

Private Sub picPlayerSpells_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    picPlayerSpells.Left = Y
    picPlayerSpells.top = X
End Sub

When you hold your mouse button, move your cursor, and release, the picture box should move to that location...

Yes, very simple code, but I havent seen it posted around here...

Also, I know the picturebox positioning is hideous, but thats the disadvantage of simple code, and not needing to use an API...



Print Page | Close Window

Bulletin Board Software by Web Wiz Forums version 8.01 - http://www.webwizforums.com
Copyright ©2001-2006 Web Wiz Guide - http://www.webwizguide.info