+ Reply to Thread
Results 1 to 2 of 2

moving on userform

  1. #1
    Forum Contributor
    Join Date
    05-14-2006
    Posts
    104

    moving on userform

    how do i create an image that i can move on a userform e,g if i was playing chess ?

  2. #2
    Harald Staff
    Guest

    Re: moving on userform

    Hi Zygan

    userform code:

    Option Explicit

    Dim X1 As Long, Y1 As Long

    Private Sub Image1_MouseDown(ByVal Button As Integer, _
    ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
    X1 = X
    Y1 = Y
    End Sub

    Private Sub Image1_MouseMove(ByVal Button As Integer, _
    ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
    If Button = 1 Then
    Image1.Left = Image1.Left + X - X1
    Image1.Top = Image1.Top + Y - Y1
    End If
    End Sub

    HTH. Best wishes Harald

    "Zygan" <[email protected]> skrev i melding
    news:[email protected]...
    >
    > how do i create an image that i can move on a userform e,g if i was
    > playing chess ?
    >
    >
    > --
    > Zygan
    > ------------------------------------------------------------------------
    > Zygan's Profile:

    http://www.excelforum.com/member.php...o&userid=34423
    > View this thread: http://www.excelforum.com/showthread...hreadid=565461
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1