Login Register


two vb.net problems filter_list
Author
Message
two vb.net problems #1
i have 2 problems, can anyone help me.

what are my issues:
firstly - how to select a picture box or all picturbox's in the application like select all but for pictureboxes.
second - how to make the selected pictureboxes move to certain mouse click locations, but actually move there and not just jump.
[Image: 6caf54.gif]

Reply

RE: two vb.net problems #2
1) It's something like:

Code:
For Each pic As PictureBox In Me.Controls pic.cls 'Or whatever Next

2) Use a dynamic array of Point. It will be really tricky, I can't help you on this one currently sorry.

[Image: rytwG00.png]
Redcat Revolution!

Reply

RE: two vb.net problems #3
wow something coder cant help on never thought id see that, and thanks for help on the first one
[Image: 6caf54.gif]

Reply

RE: two vb.net problems #4
I can try to make it, but I'm currently working on something else. :p

Should be something like:

Code:
Dim ArrPoint As Point() Private Sub MoveObject() Dim intIndex As Integer = 0 For Each pic As PictureBox in Me.Controls Redim Preserve ArrPoint(intIndex) 'Expanding our Array Do While pic.Location.X < ArrPoint.X pic.Location.X += 2 Threading.Thread.Sleep(100) Loop Do While pic.Location.X > ArrPoint.X pic.Location.X -= 2 Threading.Thread.Sleep(100) Loop Do While pic.Location.Y < ArrPoint.Y pic.Location.Y += 2 Threading.Thread.Sleep(100) Loop Do While pic.Location.Y > ArrPoint.Y pic.Location.Y -= 2 Threading.Thread.Sleep(100) Loop intIndex += 1 Next End Sub
[Image: rytwG00.png]
Redcat Revolution!

Reply







Users browsing this thread: 1 Guest(s)