Are you sure you want this in C++/CLI? If so, here's a singleton form implementation that uses C++/CLI syntax:
public ref class SingletonForm : public System::Windows::Forms::Form
{
public:
static property SingletonForm^ Instance
{
SingletonForm^ get()
{
return instance == nullptr ? instance = gcnew SingletonForm() : instance;
}
}
private:
SingletonForm(void)
{
InitializeComponent();
}
protected:
~SingletonForm()
{
if (components)
{
delete components;
}
}
private:
static SingletonForm^ instance;
System::ComponentModel::Container ^components;
}
And you would use it thus:
SingletonForm::Instance->Show();