Click inside a listbox

People,

I need to detect whats is the x, y coordinates of mouse when I click inside a listbox.

I wrote inside the mousedown event the following code:

Private Sub lstLaminacao_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles lstLaminacao.MouseDown
MessageBox.Show(e.X & e.Y)
End Sub

... but it doesnt works... the strange is what when I put the same code inside a panel, it works normally.

Some idea of how to solve this problem?
PS.: Im using thwe compact framework, for pocket PC


Thanks !


Comments

  • [b][red]This message was edited by iwilld0it at 2004-11-8 11:23:1[/red][/b][hr]
    It worked for me ... im guessing your event handler is maybe incorrectly refencing ... checks the "Handles" part next to the routine and make sure it is correctly pointing to the list-box.


    : People,
    :
    : I need to detect whats is the x, y coordinates of mouse when I click inside a listbox.
    :
    : I wrote inside the mousedown event the following code:
    :
    : Private Sub lstLaminacao_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles lstLaminacao.MouseDown
    : MessageBox.Show(e.X & e.Y)
    : End Sub
    :
    : ... but it doesnt works... the strange is what when I put the same code inside a panel, it works normally.
    :
    : Some idea of how to solve this problem?
    : PS.: Im using thwe compact framework, for pocket PC
    :
    :
    : Thanks !
    :
    :
    :



  • I saw something inside the Microsoft site.
    Its a MS bug, like is wrote in the link:

    http://support.microsoft.com/default.aspx?scid=kb;en-us;Q264013

    Now, I need to solve this bug of another way... some advice?

    Thanks again.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories