I'm making a game and I want to select a picturebox while the program is running. Then I want to make it move with I think the mouse click event. How do I go about doing this?
2 Replies - 3312 Views - Last Post: 08 October 2010 - 01:22 PM
#1
IN VB I want to select a picture box and make it move with a mouse cli
Posted 07 October 2010 - 06:56 PM
Replies To: IN VB I want to select a picture box and make it move with a mouse cli
#2
Re: IN VB I want to select a picture box and make it move with a mouse cli
Posted 08 October 2010 - 04:53 AM
(Assuming you mean VB.Net)
Read about the Mouse_Down event. I'm sure the pictureBox control has a Mouse_Down event. Create it's event handler for it by clicking the lightning bolt on the Properties Pane (F4).
Inside of this event you'll want to modify the .Location property of the pictureBox so that it moves around relative to the mouse position.
Read about the Mouse_Down event. I'm sure the pictureBox control has a Mouse_Down event. Create it's event handler for it by clicking the lightning bolt on the Properties Pane (F4).
Inside of this event you'll want to modify the .Location property of the pictureBox so that it moves around relative to the mouse position.
#3
Re: IN VB I want to select a picture box and make it move with a mouse cli
Posted 08 October 2010 - 01:22 PM
Sergio Tapia, on 08 October 2010 - 03:53 AM, said:
(Assuming you mean VB.Net)
Read about the Mouse_Down event. I'm sure the pictureBox control has a Mouse_Down event. Create it's event handler for it by clicking the lightning bolt on the Properties Pane (F4).
Inside of this event you'll want to modify the .Location property of the pictureBox so that it moves around relative to the mouse position.
Read about the Mouse_Down event. I'm sure the pictureBox control has a Mouse_Down event. Create it's event handler for it by clicking the lightning bolt on the Properties Pane (F4).
Inside of this event you'll want to modify the .Location property of the pictureBox so that it moves around relative to the mouse position.
Yes VB.Net. But I'm not sure if it's the mouse down event. I want the item selected to move torwards where I clicked. I don't want to
hold down the mouse, just click.
Also do you have any ideas how how to select a picture ox to make only the one I have selected move with the mouse click?
This post has been edited by shain mcvay: 08 October 2010 - 01:23 PM
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote



|