20-09-2008, 10:26 PM
Difficulty: 1/5 - Very easy to add/use.
Functionality: Made for MS4.
My first tutorial, not a bad one at that either, thanks to DFA.
-- CLIENT --
First, open up frmMirage & for the PictureBox you want to be Moveable, edit the following, then add it in:
Then move onto modDatabase, & add the following below "Option Explicit":
Enjoy! Post what'cha think.
P.S. For every Moveable PictureBox you want, you have to copy/paste & edit the frmMirage stuff.
Functionality: Made for MS4.
My first tutorial, not a bad one at that either, thanks to DFA.
-- CLIENT --
First, open up frmMirage & for the PictureBox you want to be Moveable, edit the following, then add it in:
Code:
Private Sub picMapEditor_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
SOffsetX = X
SOffsetY = Y
End Sub
Private Sub picMapEditor_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Call MovePicture(frmMirage.picMapEditor, Button, Shift, X, Y)
End Sub
Then move onto modDatabase, & add the following below "Option Explicit":
Code:
Public SOffsetX As Integer
Public SOffsetY As Integer
Sub MovePicture(PB As PictureBox, Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim GlobalX As Integer
Dim GlobalY As Integer
GlobalX = PB.Left
GlobalY = PB.Top
If Button = 1 Then
PB.Left = GlobalX + X - SOffsetX
PB.Top = GlobalY + Y - SOffsetY
End If
End Sub
Enjoy! Post what'cha think.
P.S. For every Moveable PictureBox you want, you have to copy/paste & edit the frmMirage stuff.