i am working on a room locator program, the feature includes the room location and the path that the searchee can take to locate the room. is there a way to move a control in a vb application just like what we see in flash applications? thanks for the ideas :))

Recommended Answers

Hi
You can move objects around in VB.net using bottom, top, left, right properties for example a Button Control.

You will however need to use a DO events as well.

Jump to Post

All 2 Replies

Hi
You can move objects around in VB.net using bottom, top, left, right properties for example a Button Control.

You will however need to use a DO events as well.

Tried this once, actually, my button did go like an old motorbike :D
My solution was Using .top and .left property and a timer.
Clicking the destination start the timer, every tick myBtn move ((myDestination.top-myBtn.top)+(myDestination.left-myBtn.left))/1000n (using n makes sure you can handle the time your object move).
First I increase myBtn.top to where myBtn.top = myDestination.top I will start increase myBtn.Left to myBtn.Left = myDestination.Left.
When myBtn.Left = myDestination.Left and myBtn.top = myDestination.top I stop my Timer.
Ha ha, pretty simple huh =))

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.