It should move the text to the mouse position, but it doesn't! Help!
Label2.Location = MousePosition - Me.Location
Offline
Me.Size = New Point(Me.Location.X - MousePosition.X, Me.Size.Height)
Label2.Location = MousePosition - Me.Location
Anyway, this is supposed to resize the form to the mouse position, when the function is called, but it doesn't work!
Offline
Usatt1337 wrote:
But seriously, explain, what?
What does eating kittens have to do with the thread? AKA quoted for proof
Offline
Sunrise-Moon wrote:
Usatt1337 wrote:
http://humour.200ok.com.au/img/pancake_bunny.jpgBut seriously, explain, what?
What does eating kittens have to do with the thread? AKA quoted for proof
I meant to copy and paste the pancake bunny, but, idk what went wrong lol.

Offline
Usatt1337 wrote:
Sunrise-Moon wrote:
Usatt1337 wrote:
http://humour.200ok.com.au/img/pancake_bunny.jpgBut seriously, explain, what?
What does eating kittens have to do with the thread? AKA quoted for proof
I meant to copy and paste the pancake bunny, but, idk what went wrong lol.
That happened to me too. It's the first image on Google Images. It's a hotlinking image. It changes once you link it.
Offline
SeptimusHeap wrote:
Can someone actually HELP?
I don't know VB. I hope to learn it though.
But sorry, I can't help.
Offline
Idont.know-vbasic=lolwut
Offline
I would help you as I used this for screensaver. Too bad it's on another computer. There's this THING called Google.
http://www.google.com.au/#hl=en&source=hp&biw=1440&bih=743&q=vb.net+change+mouse+position&btnG=Google+Search&aq=f&aqi=&aql=&oq=vb.net+change+mouse+position&gs_rfai=&fp=f58fe64ac2ffe34f
My site Offline
Me wrote:
Me.Size = New Point(Me.Location.X - MousePosition.X, Me.Size.Height)
Label2.Location = MousePosition - Me.Location
Anyway, this is supposed to resize the form to the mouse position, when the function is called, but it doesn't work!
...
I don't want to move the mouse...
Offline
Public Class Form1
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Label2.Location = MousePosition - Me.Location
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Enabled = True
End Sub
End Class
Add A Timer to your application to update the label position. Note. It isn't recommened that the label be under the mouse otherwise you can't click things.
Last edited by what-the (2010-09-29 08:28:42)
My site Offline
I tried this:
Private Sub Label2_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label2.MouseDown
Me.Size = New Point(Me.Location.X - MousePosition.X, Me.Size.Height)
Label2.Location = MousePosition - Me.Location
End SubBut it doesn't work! It's supposed to resize the form!
Offline
SeptimusHeap wrote:
I tried this:
Code:
Private Sub Label2_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label2.MouseDown Me.Size = New Point(Me.Location.X - MousePosition.X, Me.Size.Height) Label2.Location = MousePosition - Me.Location End SubBut it doesn't work! It's supposed to resize the form!
Can you explain? When you click Label2, what is supposed to happen?
Offline
SeptimusHeap wrote:
You're supposed to be able to resize the form when you drag form1.
But you can have the form setting on "sizable" to do that.
My site Offline
Yeah, well... The form is a 'splashscreen' type, I did that so it wouldn't look like a window, just a box.
Offline