Making A Gadget(Dancing Person)
Posted: Sun Sep 05, 2010 4:42 pm
First mak a new project then make it
transparency color=red
forecolor=red
backcolor=red
then add a picture box with a gif
make the picturebox sizemode autosize
then right click the form and click veiw code
delete all code found and copy and paste this
and thats it
transparency color=red
forecolor=red
backcolor=red
then add a picture box with a gif
make the picturebox sizemode autosize
then right click the form and click veiw code
delete all code found and copy and paste this
Code: Select all
Public Class Form1
Dim NewPoint As New System.Drawing.Point()
Dim X, Y As Integer
Private Sub PictureBox1_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs)
X = Control.MousePosition.X - Me.Location.X
Y = Control.MousePosition.Y - Me.Location.Y
End Sub
Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
If e.Button = MouseButtons.Left Then
NewPoint = Control.MousePosition
NewPoint.X -= (X)
NewPoint.Y -= (Y)
Me.Location = NewPoint
End If
End Sub
End Class
and thats it