BrettW Posted November 21, 2009 Posted November 21, 2009 (edited) Hi, I am making a game (a shooting game) i want the mouse to be a crosshair. I have tried making the picturebox follow the mouse like this: Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove PictureBox1.Location = MousePosition End Sub but the crosshair does not follow the mouse exactly (the crosshair is about 4cm away from cursor???) :confused: :confused: :confused: Anyone got any Ideas? Edited November 21, 2009 by BrettW Quote
Administrators PlausiblyDamp Posted November 21, 2009 Administrators Posted November 21, 2009 Using pictureboxes in that way will always be slow unfortunately. Could you not just use a custom cursor instead? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Leaders snarfblam Posted November 21, 2009 Leaders Posted November 21, 2009 Do you need a particularly specific graphic? Windows includes a crosshair cursor by default, which you could specify as the contianing control's cursor. someControl.Cursor = Cursors.Cross; Quote [sIGPIC]e[/sIGPIC]
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.