Mirage Source http://web.miragesource.net/forums/ |
|
[Feature] Moveable PictureBoxes http://web.miragesource.net/forums/viewtopic.php?f=183&t=4405 |
Page 1 of 66 |
Author: | Mattyw [ Sat Sep 20, 2008 10:26 pm ] |
Post subject: | [Feature] Moveable PictureBoxes |
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: 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. |
Author: | Blodyavenger [ Mon Dec 22, 2008 3:47 pm ] |
Post subject: | Re: [Feature] Moveable PictureBoxes |
Actualy, that all wasn't enough for me, I had to add: Code: 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 Aye, if I wanted smooth moving (without auto-move cursor to left upper corner of image and changing position of image instantly when click). So, all you have to add is calling "MovePicture" on MouseMove in picture box. |
Author: | wanai [ Tue Dec 28, 2021 3:29 am ] |
Post subject: | Re: [Feature] Moveable PictureBoxes |
Econ |
Author: | wanai [ Tue Dec 28, 2021 3:31 am ] |
Post subject: | Re: [Feature] Moveable PictureBoxes |
49.9 |
Author: | wanai [ Tue Dec 28, 2021 3:32 am ] |
Post subject: | Re: [Feature] Moveable PictureBoxes |
Bett |
Author: | wanai [ Tue Dec 28, 2021 3:33 am ] |
Post subject: | Re: [Feature] Moveable PictureBoxes |
Bett |
Author: | wanai [ Tue Dec 28, 2021 3:34 am ] |
Post subject: | Re: [Feature] Moveable PictureBoxes |
Pros |
Author: | wanai [ Tue Dec 28, 2021 3:35 am ] |
Post subject: | Re: [Feature] Moveable PictureBoxes |
Quel |
Author: | wanai [ Tue Dec 28, 2021 3:36 am ] |
Post subject: | Re: [Feature] Moveable PictureBoxes |
Laru |
Author: | wanai [ Tue Dec 28, 2021 3:37 am ] |
Post subject: | Re: [Feature] Moveable PictureBoxes |
Stan |
Author: | wanai [ Tue Dec 28, 2021 3:38 am ] |
Post subject: | Re: [Feature] Moveable PictureBoxes |
Mary |
Author: | wanai [ Tue Dec 28, 2021 3:39 am ] |
Post subject: | Re: [Feature] Moveable PictureBoxes |
ARIS |
Author: | wanai [ Tue Dec 28, 2021 3:41 am ] |
Post subject: | Re: [Feature] Moveable PictureBoxes |
Your |
Author: | wanai [ Tue Dec 28, 2021 3:42 am ] |
Post subject: | Re: [Feature] Moveable PictureBoxes |
Prov |
Author: | wanai [ Tue Dec 28, 2021 3:43 am ] |
Post subject: | Re: [Feature] Moveable PictureBoxes |
Comp |
Author: | wanai [ Tue Dec 28, 2021 3:44 am ] |
Post subject: | Re: [Feature] Moveable PictureBoxes |
Micr |
Author: | wanai [ Tue Dec 28, 2021 3:45 am ] |
Post subject: | Re: [Feature] Moveable PictureBoxes |
Magi |
Author: | wanai [ Tue Dec 28, 2021 3:46 am ] |
Post subject: | Re: [Feature] Moveable PictureBoxes |
Fait |
Author: | wanai [ Tue Dec 28, 2021 3:47 am ] |
Post subject: | Re: [Feature] Moveable PictureBoxes |
Atla |
Author: | wanai [ Tue Dec 28, 2021 3:48 am ] |
Post subject: | Re: [Feature] Moveable PictureBoxes |
Bras |
Author: | wanai [ Tue Dec 28, 2021 3:49 am ] |
Post subject: | Re: [Feature] Moveable PictureBoxes |
Fisk |
Author: | wanai [ Tue Dec 28, 2021 3:51 am ] |
Post subject: | Re: [Feature] Moveable PictureBoxes |
Mike |
Author: | wanai [ Tue Dec 28, 2021 3:52 am ] |
Post subject: | Re: [Feature] Moveable PictureBoxes |
Park |
Author: | wanai [ Tue Dec 28, 2021 3:53 am ] |
Post subject: | Re: [Feature] Moveable PictureBoxes |
Play |
Page 1 of 66 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |