![]() |
[Feature] Moveable PictureBoxes and Images - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Source Code Development (https://mirage-engine.uk/forums/forumdisplay.php?fid=51) +----- Forum: Mirage Source 4 (Visual Basic 6) (https://mirage-engine.uk/forums/forumdisplay.php?fid=44) +------ Forum: Tutorials (https://mirage-engine.uk/forums/forumdisplay.php?fid=13) +------ Thread: [Feature] Moveable PictureBoxes and Images (/showthread.php?tid=2909) |
[Feature] Moveable PictureBoxes and Images - ExoShox - 01-07-2009 Difficulty: 1/5 Sides: Client Only Tested on: MS4 Works for: MS4 Credits: Me ![]() Tutorial Type: Copy and Paste with a Teeny bit of Modification Description of Variables (You can copy these comments into your program for other programmers to read): Code: ' OHOX/OHOY are the variables that define the Object Hold Offset X/Y Put the following in modDatabase under Option Explicit: Code: Public DX, DY as Long Put The Following Code In the Form's Code Editor (Whichever form contains the picture you want to move) And Replace the 's with the name of the Picture you want to move: Code: Private Sub _MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Put The Following Code In the Form's Code Editor (Whichever form contains the image you want to move) And Replace the 's with the name of the Img you want to move: Code: Private Sub _MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) And Put this in modDatabase at the bottom: Code: Public Sub PicMove(CFrm As Form, CPic As PictureBox, Button As Integer, Shift As Integer, X As Long, Y As Long) |