Results 1 to 4 of 4

Thread: Clicking on a label?

  1. #1
    Guest
    This one should be easy for you lot...

    I've got a label sitting on top of a picture box. I want things to execute some code when I click on it, but the event just doesn't happen (i've tried click, mousedown, mouseup...)

    It's probably something to do with this code which lets me drag my window around by clicking anywhere on it:

    Code:
    Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
    Private Declare Function ReleaseCapture Lib "user32" () As Long
    
    
    Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
        ReleaseCapture
        SendMessage Me.hWnd, &HA1, 2, 0&
    End Sub
    Some other labels on the form will recieve clicks, but the one in question just drags the form around when I click on it.

    Any ideas??
    Thanks!

  2. #2
    Hyperactive Member
    Join Date
    May 2000
    Location
    Kalix, Norrbotten, SWEDEN
    Posts
    343
    Hi

    Is the label enable property set to true?


    /Smirre
    Visual Basic
    C, C++
    Java
    Access
    SQL Server

    MCP, MCSD

  3. #3
    Guest
    Yep, it is...

  4. #4
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    is the locked property set to false?

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