I thought I'd might as well start this thread. What do you need help with? Someone is bound to see this and read it, and chances are they know the solution to your problem.
I'll start it off: How do I make a picture box in Visual Basic not go off the screen, like if it touches the corners of the form it stops and can't go any further in that direction, but can go the other direction(s).
I'll start it off: How do I make a picture box in Visual Basic not go off the screen, like if it touches the corners of the form it stops and can't go any further in that direction, but can go the other direction(s).
PictureBox controls don't just move around at random. You're going to have to give us more information.
What would be a good idea for a main loop for a Runescape Private Server?
What I have right now is essentially
Code:
receivePackets() // Receives all incoming packets
process() // Handles the packet queue
updateWorld() // World-stuff that needs to updated every tick
updateClients() // Sends the update queue to all of the clients
I mean to literally not allow it off the form lol. It sounds weird explaining it.
There's no property you can set that says, "Don't allow this control off the edge of the screen," you have to manually add code to check that in with the code that updates its position.
What would be a good idea for a main loop for a Runescape Private Server?
What I have right now is essentially
Code:
receivePackets() // Receives all incoming packets
process() // Handles the packet queue
updateWorld() // World-stuff that needs to updated every tick
updateClients() // Sends the update queue to all of the clients
Probably not. With this model, one slow client would slow down the entire server.
' All of these are easily accessible from the default properties on form and picture box controls
Store X, Y <-- Position of the picture box
Store picWidth, picHeight <-- Width and height of the picturebox
Store frmWidth, frmHeight <-- The width and height of your form
' Now, check if we're in bounds for each movement
If X > 0 Then
' Move left here
End If
If (X + picWidth) < frmWidth Then
' Move right here
End If
If Y > 0 Then
' Move up here
End If
If (Y + picHeight) < frmHeight Then
' Move down here
End If
Might not work exactly like that (it's VB -_-), but there's a general idea.
Everyone here is fucking sick at your constant whining and 10 million problems when you try to copy paste code and expect it to work. We've all tried to help you many times, but you aren't grateful and you complain like a bitch when we don't give you code that you can just copy paste and expect to work.
Do us all a favor and fuck off.
(User was banned for this post ("Flaming / trolling. PM a mod if you have issues with another member." - birkett))
Christ, lay off him a bit guys. Ok he's irritating, but there's no reason to launch into him on the public forum. Ask a mod to ban him, or have your little character assassination over pms. He is a real person, you know.
Christ, lay off him a bit guys. Ok he's irritating, but there's no reason to launch into him on the public forum. Ask a mod to ban him, or have your little character assassination over pms. He is a real person, you know.
Come on just read most of the posts he's made on this forum and the lua forum etc.