Is FeatureCAM Add-Ins non-modal Form possible?

Is FeatureCAM Add-Ins non-modal Form possible?

atomic.lex
Enthusiast Enthusiast
570 Views
2 Replies
Message 1 of 3

Is FeatureCAM Add-Ins non-modal Form possible?

atomic.lex
Enthusiast
Enthusiast

I created an Add-In with a dialog form, but it works only modal (I can't do anything, when the dialog window is open). Can I set this form as non-modal?

0 Likes
571 Views
2 Replies
Replies (2)
Message 2 of 3

kamalrajcv
Explorer
Explorer

Yes, it is possible to create a non-modal form for your FeatureCAM Add-In.

By default, when you create a dialog form in FeatureCAM, it is created as a modal form. This means that the user cannot interact with the FeatureCAM interface until the dialog form is closed.

To make your form non-modal, you will need to change the ShowDialog method to Show.

Here is an example:

 

Public Class MyAddIn
Inherits FeatureCAM.tagFMAddIn

Private myForm As MyForm

Public Overrides Sub OnCommand(ByVal CommandID As Long)
If CommandID = 1 Then
If myForm Is Nothing Then
myForm = New MyForm()
myForm.Show() 'Change from myForm.ShowDialog() to myForm.Show()
End If
End If
End Sub

End Class


By changing the ShowDialog method to Show, the form will be displayed as a non-modal form, and the user will be able to interact with the FeatureCAM interface while the form is open.

Note that since the form is now non-modal, the user can still interact with the FeatureCAM interface even if the form is open. This means that you will need to handle any user interactions appropriately in your code.

Message 3 of 3

atomic.lex
Enthusiast
Enthusiast

Thanks a lot for an answer.

I've tried to declare a new class, but FeatureCAM API probably don't allow it.

0 Likes