Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Main border


Escanor
 Share

Recommended Posts

Hello,

I have remove the main border to add mine. I draw the new border in modgraphics but I can't move the game screen.I have no idea how to make the move.

Can You help me please ?

Here the result when I draw the border

![](http://image.noelshack.com/fichiers/2016/11/1457960168-capture.png)
Link to comment
Share on other sites

This will require a bit of custom coding.

Basically you check for a mouse down event. In that event you see if the mouse is positioned on top of the border. If so, you set a movement variable to true.. Then whenever the mouse moves check if that movement variable is true, if so move the game screen the same amount as the displacement of your mouse.

When the mouse button is released, set the movement variable to false.
Link to comment
Share on other sites

Something like this would be useful although you will need to edit it as it will put the client's very top left corner at your mouse position, edit it to suite your needs:

```
Private mouseClicked As Boolean

Private Sub picTitleGUI_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
mouseClicked = True
End Sub

Private Sub picTitleGUI_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
mouseClicked = False
End Sub

Private Sub picTitleGUI_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
If mouseClicked Then
frmMain.Left = frmMain.Left + x
frmMain.Top = frmMain.Top + y
End If
End Sub

```
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...