Jump to content
Fórum Script Brasil
  • 0

Onmouse Over



Ola gente como consigo fazer ....

1 tenho uma imagem que to tratando como se fosse um botaum...

2- quero q quando o mouse passar por cima dela a imagem mude....tem jeito?


Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Coloque as seguintes declarações no General Declarations do form ou em um módulo (nesse caso troque o escopo para Public):

Private Declare Function SetCapture Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function ReleaseCapture Lib "user32" () As Long
E coloque esse código no evento MouseMove da PictureBox:
If ((X < 0) Or (Y < 0) Or (X > Picture1.Width) Or (Y > Picture1.Height)) Then
        Picture1.Picture = LoadPicture("c:\arq\images\6.gif")
        SetCapture Picture1.hwnd
        Picture1.Picture = LoadPicture("c:\arq\images\5.gif")
    End If




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Forum Statistics

    • Total Topics
    • Total Posts
  • Create New...