Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

VS 2005 Moving A PictureBox To A Certain Location - Help

$
0
0
Attachment 97525

The PictureBox I'm talking about is the Ball,

And There Is A Horizontal PowerPack Line Moving Down From The Top of the Goal,
and A Vertical PowerPack Line Moving To The Right From The Left of the Goal,

and I'd like to move the Ball to the Location/Point of Intersection of those two lines,
how will I move the ball?

Because I tried using,

picBall.Left -= Int(PowerBar.Value / 2)
picBall.Top -= Int(PowerBar.Value / 2)

If picBall.Left <= LineShape1.Y2 / 2 And picBall.Right <= LineShape2.X2 / 2 Then
Shoot.Enabled = False
Me.Refresh()
End If

I still don't have the codes on how to get the Intersection, and the "Shoot.Enabled = False" is to stop the ball from moving, the problem is if I use picBall.Left and picBall.Top, it's always moving to the left side, any other ideas?
Attached Images
 

Viewing all articles
Browse latest Browse all 27554

Trending Articles