Hello,
I'm writing a program in VB 3.0 pro with an Oracle Database.
To display the data, I use a Datagrid from Sheridan Data Widgets.
So far, so good. But here it comes :
When the data is put in the datagrid for the first time, the first record
automatically becomes the current record. Clicking on a row/column with the
left mouse button causes the underlying record to become the active record.
Logical. BUT.... clicking with the right mouse button on a row/column....
nothing happens (execpt for a mousedown event). This in contrast to Excel or
Access, where clicking with the right mouse button on a Row/Column does
change to active record.
So, since I have placed some code in the mousedown event (additional info is
displayed), I would like the underlying record also to become automatically
the active record. Otherwise a user would first have to select the record
with a left mouse click, and then have to click on the right button to
display the extra data.
My idea was to 'generate' a left - mouse - button - click, by using the
SENDMESSAGE function, however, this doesn't work either.
Sub ssdatamain_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then
rc = SendMessage (ssdatamain.hwnd, WM_LBUTTONDOWN, 0, (Clng(Y)*&H1000 OR X))
call district_date
End if
End Sub
So, my question is very simple :
Does anybody have an idea ? Tip ? Hint ? Comment ? Suggestion ?
Anything would be appreciated.
Thanks,
Alain