Results 1 to 5 of 5

Thread: Image Control Mouse Click Event?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2003
    Location
    Baton Rouge, Louisiana.
    Posts
    109

    Question Image Control Mouse Click Event?

    HIiiii

    I am trying to use Image Control MouseDown and MouseUp event. It is responding for right mouse click. But not for left mouse click. Even it is not responding for Click and Double_Click event too.

    What could be problem?

    Hdave
    ~~~......Hope never dies. one has to work for it to make it reality.......~~~

  2. #2
    Fanatic Member
    Join Date
    Feb 2003
    Location
    C:\Windows\Microsoft.NET\Framework
    Posts
    574
    Code?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Dec 2003
    Location
    Baton Rouge, Louisiana.
    Posts
    109
    HIii,

    Private Sub ImageProcess_MouseDown(Index as integer,Button as integer,Shift as Integer,x as single, y as single)

    if button = vbLeftButton then
    'call method in module
    end if

    if button = vbRightButton then
    'call method
    end if
    end sub

    i had put brake point on this routine. and then run the application. when i left clicked on imageBox control(ImageProcess) it did not come to this routine at all.
    but when i right clicked on it, it came.


    it suppose to work for both click event.

    plase let me know if there is error? or what could be problem?

    Hdave
    ~~~......Hope never dies. one has to work for it to make it reality.......~~~

  4. #4
    Fanatic Member
    Join Date
    Feb 2003
    Location
    C:\Windows\Microsoft.NET\Framework
    Posts
    574
    Hmm. Are you also processing some other event for this same Image control that might be interfering with the MouseDown of this image control? For eg. are you also handling the Image_Click event for this same image? If you are, you might be calling some piece of code that detracts the flow from then attending to the MouseDown event in the queue.

    Although the correct sequence is _MouseDown and then _Click afterwards, however it sometimes does happen that handling an event affects the execution of another. Could you please post more code, may be other events of this same Image control that you are handling?

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Dec 2003
    Location
    Baton Rouge, Louisiana.
    Posts
    109

    Talking

    Hey!Sathyaish,

    I found what was problem. As i set DragMode property of ImageBox to "1-Automatic". Imagebox control is not reponding to MouseClick or DoubleClick or MouseDown Events. Once i changed it to "0-Manual" it is responding.

    Thanks for your consern and help.

    Hdave
    ~~~......Hope never dies. one has to work for it to make it reality.......~~~

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