09-07-2006, 12:41 AM
Author: pingu
Difficulty: 1/5
:: CLIENT SIDE ::
In modDatabase, after "Option Explicit" add:
At the bottom of modDatabase, add:
Okay, thats all for that portion. Now, let's say we want to make the map editor drag-able. First, add a private sub for the mapeditor pic with mousedown and mousemove:You can do the same thing with other things, too. =) Just follow with the above code.
Difficulty: 1/5
:: CLIENT SIDE ::
In modDatabase, after "Option Explicit" add:
Code:
Public SOffsetX As Integer
Public SOffsetY As Integer
At the bottom of modDatabase, add:
Code:
Sub MovePicture(PB As PictureBox, Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 1 Then
PB.Left = PB.Left + x - SOffsetX
PB.top = PB.top + y - SOffsetY
End If
End Sub
Okay, thats all for that portion. Now, let's say we want to make the map editor drag-able. First, add a private sub for the mapeditor pic with mousedown and mousemove:
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