Results 1 to 2 of 2

Thread: Mouse over,image Change

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Posts
    482

    Post

    Hello this is a code i have

    Private Sub heal_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)

    If heal.Picture.Handle = 0 Then
    heal = LoadPicture(clean.Picture)
    Else
    heal = LoadPicture(play.Picture)
    End If
    End Sub


    It 'would' work but it says clean.picture and play.picture are not file names

    when i try


    Private Sub heal_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)


    If heal.Picture.Handle = 0 Then
    heal = clean.Picture
    Else
    heal = play.Picture
    End If
    End Sub


    It gives me a different error about procedure also if i try heal.picture = play.picture


    I know i have all the images there, and they are images, but i can't make it change the picture

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    If you just want to assign the picture from one picture box to another, then you don't have to use LoadPicture.


    Picture1.Picture = Picrure2.Picture


    You could use LoadPicture when you are using a path to the picrure.


    Picture1.Picture = LoadPicture("C:\MyPicture.bmp)


    ------------------

    Serge

    Senior Programmer Analyst
    [email protected]
    [email protected]
    ICQ#: 51055819

Posting Permissions

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



Click Here to Expand Forum to Full Width