Message 1 of 1
c# Custom button error handler
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey guys been practicing c# in this past few weeks . I tried to make custom button , here is the code
using System; using System.Windows.Forms; using ManagedServices; namespace WindowsFormsApplication20 { public partial class Form1 : Form { public Form1() { InitializeComponent(); chk(); } private void button1_CUIUpdated(object sender, EventArgs e) { } private static void chk() { try { MaxscriptSDK.ExecuteMaxscriptCommand("print \"hello\""); } catch { MessageBox.Show("Hallo"); //MessageBox.Show("not valid"); } } private void button1_Click(object sender, EventArgs e) { } } }
im stumble upon how to check if this custom dll run in max or not ? if run in max I want do something [like print something] , if not just do nothing. Here is the error code....
Thanks in advance .