Hello,
The best way to make the 3DGraph pan when you click the right mouse button is to use the Windows user32.dll to programmatically press the shift button. The idea is on the MouseDownEvent you can check to see if the right mouse button was clicked, and then programmatically press the shift key and the left mouse button using the user32.dll. Then when you move the mouse the 3DGraph will pan. Then on the MouseUpEvent you can programmatically release the shift key and the left mouse button. Here is some sample code I wrote in VB.NET which demonstrates this.
Declare Auto Sub keybd_event Lib "user32" (ByVal vK As Integer, ByVal scan As Integer, ByVal flags As Long, ByVal extraInfo As Integer)
Declare Auto Sub mouse_event Lib "user32" (ByVal flags As Integer, ByVal x As Integer, ByVal y As Integer, ByVal data As Integer, ByVal extraInfo As Long)
Private Sub AxCWGraph3D1_MouseDownEvent(ByVal sender As Object, ByVal e As AxCW3DGraphLib._DCWGraph3DEvents_MouseDownEvent) Handles AxCWGraph3D1.MouseDownEvent
If e.button = 2 Then 'Checks to see if the right mouse button was clicked
keybd_event(&HA0, 0, 0, 0) 'Programmatically holds down the shift key
mouse_event(2, e.x, e.y, 0, 0) 'Programmatically holds doen the left mouse button
End If
End Sub
Private Sub AxCWGraph3D1_MouseUpEvent(ByVal sender As Object, ByVal e As AxCW3DGraphLib._DCWGraph3DEvents_MouseUpEvent) Handles AxCWGraph3D1.MouseUpEvent
If e.button = 2 Then 'Checks to see if the right mouse button was released
mouse_event(4, e.x, e.y, 0, 0) 'Programmatically releases the left mouse button
keybd_event(&HA0, 0, 2, 0) 'Programmatically releases the shift key
End If
End Sub
I hope this information is helpful for you.
Regards,
Kevin L.
Applications Engineer
National Instruments