Viewer Control Events Not Firing

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
slingblade
Posts: 16
Joined: 31 May 2010, 13:33

Viewer Control Events Not Firing

Post by slingblade » 03 Jun 2010, 04:30

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

slingblade
Posts: 16
Joined: 31 May 2010, 13:33

Re: Viewer Control Events Not Firing

Post by slingblade » 03 Jun 2010, 07:58

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?

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: Viewer Control Events Not Firing

Post by support » 04 Jun 2010, 12:33

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.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply