hisherwin Posted July 17, 2012 Author Share Posted July 17, 2012 Well i found that other movable GUI are buggy …So i made something that is not . Eh little bit BuggyActually i ripped this on a Visual Basic Project (Not Eclipse)Lets StartClient Side OnlyLets make a MouseDown for the picture you want to Move..```Private Sub picture_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) picture.ZOrder (0)End Sub```Now this will enable you to move the picture , But it need a MouseMove attach on it..Lets make a MouseMove for the picture..```Private Sub picture_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single) Static MouseX As Long, MouseY As Long Dim TempX As Long, TempY As Long If Button = 1 Then If y < 22 Then TempX = picture.Left + (x - MouseX) TempY = picture.top + (y - MouseY) If TempX < 0 Then TempX = 0 If TempX > (500 - picture.width) Then TempX = (500 - picture.width) If TempY < 0 Then TempY = 0 If TempY > (500 - picture.height) Then TempY = (500 - picture.height) picture.Left = TempX picture.top = TempY End If Else MouseX = x MouseY = y End IfEnd Sub```Change the picture height and width if you want .. Change the "picture" also..I hope this will help.. Link to comment Share on other sites More sharing options...
Justn Posted July 17, 2012 Share Posted July 17, 2012 Cool. So this doesn't have the ugly gray that follows the GUI when moving it over the picscreen? Link to comment Share on other sites More sharing options...
hisherwin Posted July 17, 2012 Author Share Posted July 17, 2012 Depend on how slow is your computer , But mine doesn't have ugly gray …And on item window , You can now drag your Item on it .. Link to comment Share on other sites More sharing options...
zerohero Posted July 17, 2012 Share Posted July 17, 2012 This isn't really a very good way of moving a physical object within visual basic. Why not just use the .move functionality? Example -```PictureExample.Move PictureExample.Left - (StartX- X), PictureExample.Top - (StartY- Y)```All you need to do with this method is add an onmousedown event and manage the StartX/Y cords from there. Link to comment Share on other sites More sharing options...
tslusny Posted July 17, 2012 Share Posted July 17, 2012 @zerohero:> This isn't really a very good way of moving a physical object within visual basic. Why not just use the .move functionality? Example -> > ```> PictureExample.Move PictureExample.Left - (StartX- X), PictureExample.Top - (StartY- Y)> ```> All you need to do with this method is add an onmousedown event and manage the StartX/Y cords from there.This will or freeze gamescreen or it will drop that shadow thing Link to comment Share on other sites More sharing options...
zerohero Posted July 17, 2012 Share Posted July 17, 2012 @Deathbeam:> This will or freeze gamescreen or it will drop that shadow thingI tested it using a picturebox and it seemed just fine to me, I will do some further testing using both methods and give a definitive answer. Link to comment Share on other sites More sharing options...
hisherwin Posted July 18, 2012 Author Share Posted July 18, 2012 i don't see any errors of it.. Link to comment Share on other sites More sharing options...
clark Posted July 26, 2012 Share Posted July 26, 2012 Hey !Thank you very much for this Script , but can you tell me where to place exactly the code etc ? Link to comment Share on other sites More sharing options...
hisherwin Posted July 27, 2012 Author Share Posted July 27, 2012 on the picture you want to move , for example picInventory , or picSpells .. If the picture already have a MouseMove and MouseDown then just add the code… Link to comment Share on other sites More sharing options...
clark Posted July 28, 2012 Share Posted July 28, 2012 Sorry it's a bit hard for me to use visual basic ^^i need more clear details ( i know you do as you can )Ok so if i understand i need to put Mouse move + Mouse Down codethen after that i need to add another code (as you said in your last message) but where is it ?i see only 2 codes one for mousemove and another for mousedown :Si'm using nightly Eclipse dx8 (if it can help you ) Link to comment Share on other sites More sharing options...
hisherwin Posted July 30, 2012 Author Share Posted July 30, 2012 This tut work for Eo and Eo 3.0 … If you are using this tut for picCharacter, picInventory then just find their mousemove and mousedown , If they don't have then just create one..```Private Sub picCharacter_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)``` Link to comment Share on other sites More sharing options...
hb420 Posted August 3, 2012 Share Posted August 3, 2012 ~~durp~~ Link to comment Share on other sites More sharing options...
Shippous Posted October 6, 2012 Share Posted October 6, 2012 to dont move the windows when you are selecting a spell just putIf DragSpell = 0 thenin the code.andIf DragInvSlotNum = 0 Thento itens. Link to comment Share on other sites More sharing options...
Joyce Posted October 8, 2012 Share Posted October 8, 2012 Funny, this is the EXACT code Stein wrote for Eclipse Dawn. 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