Growlith1223 Posted June 16, 2012 Author Share Posted June 16, 2012 hi um…Is it possible so like when you move a picturebox(IN GAME) it doesn't go past the border of the window?if so could ya plz share the code with meh? :3If you need more detail...I want it so how you can move the Character menu like in CrystalShire Link to comment Share on other sites More sharing options...
Exception Posted June 16, 2012 Share Posted June 16, 2012 If Drag.X + Drag.Width >= frmMain.**ScaleWidth** (NOT Width, that counts the windows borders, ScaleWidth doesn't) Then Drag.X = frmMain.ScaleWidth - Drag.WidthIf Drag.X <= 0 Then Drag.X = 0There's the basic code for it, that you'd have in the MouseMove event. Link to comment Share on other sites More sharing options...
Growlith1223 Posted June 16, 2012 Author Share Posted June 16, 2012 that code gives you a major screen glitch. Link to comment Share on other sites More sharing options...
Exception Posted June 16, 2012 Share Posted June 16, 2012 Well, I did say basic for a reason. Take the theory, and adapt it to your use. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now