Hello,
I'm trying the Spline Align tutorial and I have a problem with the windows form. When Max starts, it effectively loads the SplineAlign.dll because I see the form showing up, but it doesn't stay displayed on screen. It just pops and disappears.
This is the code i'm using :
SplineAlign.cs :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Max;
namespace SplineAlign
{
public class SplineAlign : IPlugin
{
#region IPlugin Members
public void Cleanup()
{
}
public void Initialize(IGlobal global, System.ComponentModel.ISynchronizeInvoke sync)
{
SplineAlignDialog dialog = new SplineAlignDialog(global);
dialog.Show();
}
#endregion
}
}
SplineAlignDialog.cs :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Autodesk.Max;
namespace SplineAlign
{
public partial class SplineAlignDialog : Form
{
IGlobal global;
public SplineAlignDialog(IGlobal global)
{
this.global = global;
InitializeComponent();
}
private void SplineAlignDialog_Load(object sender, EventArgs e){}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("Hello World!");
}
}
}
Thanks for the help!
Darholm