Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - The Click-Event by the ReportControl
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

The Click-Event by the ReportControl

 Post Reply Post Reply
Author
Message
finn View Drop Down
Groupie
Groupie
Avatar

Joined: 11 February 2005
Location: Germany
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote finn Quote  Post ReplyReply Direct Link To This Post Topic: The Click-Event by the ReportControl
    Posted: 22 March 2005 at 5:26am

Hello!

I'm working with Visual Basic 6 Enterprise Edition and have got one question. The ReportControl has got the Events "RowDblClik" and "RowRClick". But how can I know, that the user clicked with the left mouse button on the ReportControl. I want to know that, because I ant to react, when the user clicked with the left mouse butoon on the ReportControl.

Thanks for help!

Yours,

Finn!

PS.: Soryy for my bad English, but I'm from Germany and can't speak and write English very well.

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 22 March 2005 at 6:08am
use MouseDown event.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
finn View Drop Down
Groupie
Groupie
Avatar

Joined: 11 February 2005
Location: Germany
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote finn Quote  Post ReplyReply Direct Link To This Post Posted: 22 March 2005 at 6:11am

Thank you!

Yours,

Finn!

Back to Top
finn View Drop Down
Groupie
Groupie
Avatar

Joined: 11 February 2005
Location: Germany
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote finn Quote  Post ReplyReply Direct Link To This Post Posted: 22 March 2005 at 8:44am

Hello!

I tried to use the MouseDown event, but it doesn't work like I want. Now I will tell you, what I want to do:

When the user clicks with the left mouse button on a row, which isn't a GroupRow, then I want to read out the value of the first column.

I hope you can help me!

Yours,

Finn

Back to Top
ianp View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 19 December 2003
Location: United Kingdom
Status: Offline
Points: 119
Post Options Post Options   Thanks (0) Thanks(0)   Quote ianp Quote  Post ReplyReply Direct Link To This Post Posted: 22 March 2005 at 9:43am

Take a look at the ReportControl Sample for a better idea of how to use the MouseDown event. Below is a modified snippet of the code from this event in frmMain.

Hope this does the trick


Private Sub wndReportControl_MouseDown(Button As Integer, Shift As Integer, X As Long, Y As Long)
Dim hitRow As ReportRow

If Button = vbLeftButton Then
    'Returns a reference to the row clicked
    'Determines which row the mouse was positioned over on mousedown.
    Set hitRow = wndReportControl.HitTest(X, Y).Row
    If Not hitRow Is Nothing Then
        If hitRow.GroupRow Then
             Debug.Print "MouseDown on GroupRow"
        Else
             Debug.Print "MouseDown on Row # " & hitRow.Index
             Debug.Print "Value of First Item added to the Record = " & hitRow.Record.Item(0).Value
        End If
    End If
End if
End Sub



Edited by ianp
Back to Top
finn View Drop Down
Groupie
Groupie
Avatar

Joined: 11 February 2005
Location: Germany
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote finn Quote  Post ReplyReply Direct Link To This Post Posted: 22 March 2005 at 9:53am

Thank you very much! It works very well!

Yours,

Finn!

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.