Moving cursor position
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
7 posts
Page 1 of 1
So i want an image to follow the cursor and i mean directly behind it
But when i run the program the image is extremely off
current code im using
Please help
But when i run the program the image is extremely off
current code im using
Code: Select all
i have used PictureBox1.Location = New Point(MousePosition.X, MousePosition.Y)
Code: Select all
neither work PictureBox1.Location = MousePosition
Please help
You should use your form's move event, not picturebox's.
type under the public class Form1 : Protected overrides onmousemove - press enter
then add picturebox1.location=new point(e.x,e.y)
type under the public class Form1 : Protected overrides onmousemove - press enter
then add picturebox1.location=new point(e.x,e.y)
Doesn't work. Maybe i did it wrong but this is what happened
Code: Select all
I don't know if this changes anything, but here is my forms changed settings Protected Overrides Sub OnMouseMove(e As MouseEventArgs)
MyBase.OnMouseMove(e)
PictureBox1.Location = New Point(MousePosition.X, MousePosition.Y)
End Sub
Code: Select all
AutoScaleMode-Font
BackColor-WindowFrame
ForeColor-WindowFrame
FormBorderStyle-None
ShowInTaskbar-False
Size-ScreenSize
StartPosition-CenterScreen
Text-FullScreen
TopMost-True
TransparancyKey-WindowsFrame
Do you want to move your form all over the screen, or picturebox inside the form ?
maybe with
Code: Select all
Protected Overrides Sub OnMouseMove(e As MouseEventArgs)
MyBase.OnMouseMove(e)
PictureBox1.Location = New Point(e.Location.X, e.Location.Y)
End Sub
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
hey
I'm currently @ school so I can't look up the code but I have made a game where this code is used: viewtopic.php?f=71&t=9468
Just download the source and search for the mousemove event
I'm currently @ school so I can't look up the code but I have made a game where this code is used: viewtopic.php?f=71&t=9468
Just download the source and search for the mousemove event
I actually fixed it myself. The reason why it was happening was because the start position of the form.
7 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023