I haven't check it, but implement once and use ID to determine which button was pressed.
That is exactly what I was thinking.
In the templete PMPHandler.vb file there is one statement for implements.
I used to work with Windows Form in VB.NET, there I just need to double-click the button in the Form and the codes show automatically. Here in VB.NET+Addin, I have to do it manuelly but I dont know how to define the buttons.
Would you please have a look into it?
I am still waiting for somebody's advice. Any help will be highly appreciated. Thanks.
can you post your code here. I can look at it, but I don't feel like to spend time to create same case.
Make sure that you define imports: Imports SolidWorks.Interop.swpublished
If you type a line of code: Implements PropertyManagerPage2Handler9 and cursor is at the end (directly behind of number nine), just hit enter key on keyboard. All methods should be created automatically.
Other way is, right click on "PropertyManagerPage2Handler9" and choose "Quick Actions..."
Pop up menu will show option "Implement interface". Choose this options. All methods should be created automatically.
Each control has unigue ID defined in class, for example: UserPMPage.vb
This ID should be used to identify if any action happened with that control. It means, one method for all buttons when one of them is pressed.
Public Sub OnButtonPress(Id As Integer) Implements IPropertyManagerPage2Handler9.OnButtonPress