This is a tough one.... 
Author Message
 This is a tough one....

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



Sun, 25 Apr 1999 03:00:00 GMT  
 This is a tough one....

Quote:

> 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   Just calling  

    ssdatamain_MouseDown (1, Shift, X, Y)
  might work.  



Thu, 06 May 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. A tough one! Import password protected VBA

2. Attention Access Experts, this one is tough...

3. Running Native Access commands in VB..Tough one

4. tough one for you experts

5. A tough one.. animating buttons

6. Tough one!!!

7. tough one for you experts

8. tough one for you experts out there...

9. This is a tough one ( ActiveX Dll problem )

10. Kind of a tough one...

11. Tough one: ActiveX control errors w/Collections

12. tough one

 

 
Powered by phpBB® Forum Software