Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 149,436 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 2,302 people online right now. Registration is fast and FREE... Join Now!




Movement Help

 
Reply to this topicStart new topic

Movement Help, ASking a question

Dracitus
21 Jan, 2008 - 09:40 AM
Post #1

New D.I.C Head
*

Joined: 19 Jan, 2008
Posts: 3

How do You make a Button Change Collur Once You Reach a Point on the Screen. Like if i move to Location 300,300 Then I Get faster Speeds for the Button and if i move back it gets slower?


Also How Do You Select Picture Boxs At run Time And Move ThemTo The Click of a Mouse Like Drag Select ThenClick onscreen And Pictureboxes Move To That Location Please Help Thanks


And can you just tell me how to move on a groupbox i can me on the form but i need help sorry if i seem demanding i dont really know much about anything but im able to move round about the screen so im trying it on a group box and cant seem to get it to move.

*Edit: Formatted to make it look nicer. - Martyr2

This post has been edited by Martyr2: 21 Jan, 2008 - 04:00 PM
User is offlineProfile CardPM
+Quote Post

Martyr2
RE: Movement Help
21 Jan, 2008 - 04:09 PM
Post #2

Programming Theoretician
Group Icon

Joined: 18 Apr, 2007
Posts: 5,654



Thanked: 313 times
Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions
In response to your first question, you can use the MouseMove event. This event handles whenever the mouse moves and passes in the coordinates of the mouse. With it you can determine the location of the mouse and if it has an X coordinate of less than 300 and a Y coordinate less than 300, you can change the color of the button (lookup the property of the button called BackColor).

For your second question, you seem to be asking about drag and drop. There is a nice article that can show you the basics here...

vb-helper.com - Drag and Drop example

The idea is to start a DoDragDrop on the control and on your target setup a DragDrop event to then accept the drag content and do whatever you want with it.

The last question... as far as moving the group box, it is the same as any other control. You can set the "left" and "top" properties of the groupbox to movie it. That or use the Location method which takes a point object.

Hope this helps! smile.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 12:14PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month