Page 1 of 1

Viewer Control Events Not Firing

Posted: 03 Jun 2010, 04:30
by slingblade
Hi,

I am using the CADEditorControlDemo and I am trying to get access to the entity that I select/click in the viewer control.

However none of the mouse events for the control fire when I click into the drawing.

Can you please let me know how I capture the mouse click event from the control?

BTW: I have tried MouseDown, MouseClick and Click events and none fire.

Code: Select all

 Public Sub New()
        Me.InitializeComponent()
        Me.InitializeSettings()

'       ' hooking event here
        AddHandler cadEditorControl.MouseClick, AddressOf cadEditorControl_MouseClick
    End Sub
This event is not firing

Code: Select all

Private Sub cadEditorControl_MouseClick(ByVal sender As Object, _
    ByVal e As MouseEventArgs)
        Try

           ' ... do something here

        Catch ex As Exception

        End Try
    End Sub

Re: Viewer Control Events Not Firing

Posted: 03 Jun 2010, 07:58
by slingblade
Ok I have discovered from the FAQ_Demo that CADPictureBox control mouse down event does fire and I am able to use it to do what I need. :P

I'm new to CADSoftTools and I have a couple of questions,

1) what's the purpose/differences in the CADImport.FaceModule.CADPictureBox, CADEditorControl and the CADViewerControl?

Do you have any documentation that talks about the concept behind each of your different controls and what there responsibilities are?

2) From looking at the documentation and object browser I believe I understand most of the Namespaces and Classes and their responsibilities just based on what you have named them.

However I'm struggling with CADImport.FaceModule. The name "FaceModule" isn't obvious to me. What happens under that namespace, i. e. what do classes in that namespace do?

Re: Viewer Control Events Not Firing

Posted: 04 Jun 2010, 12:33
by support
Hello.
CADEditorControl provides the Editor functionality and CADViewerControl - Viewer functionality. Editor or Viewer functionality can be added to your application with the control. CADImport.FaceModule.CADPictureBox class represents an advanced PictureBox object that can be used for displaying an image. CADPictureBox as well as other classes from CADImport.FaceModule namespace used for visual part of component realization.

Alexander.