- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
It looks like the Lesson 3 C# code sample is incomplete, there's no private void (equivalent of a private sub from VB?) Form1_FormClosed, as a result Inventor doesn't close correctly when the form is closed. I've written the code like this:
private void Form1_FormClosed(object sender, System.Windows.Forms.FormClosedEventArgs e) { if (_started) _invApp.Quit(); _invApp = (Inventor.Application)null; }
but it doesn't work. It runs/compiles error free, but when I close the form Inventor doesn't close. The VB sample has 'ByVar' in the sub argument (inside the brackets). I wondering if I shoudl be using a C# equivalent here, I just don't know what it is. I appreciate any help that can be given here.
Scott Moyse
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
RevOps Strategy Manager at Toolpath. New Zealand based.
Co-founder of the Grumpy Sloth full aluminium billet mechanical keyboard project
Solved! Go to Solution.