while ( true )
{
CPM^ _oPM = gcnew CPM(); // the class inherit from System::Windows::Forms::Form
_oPM->ShowWindow(this);
}
in class CPM :
private: delegate System::Void ShowWindowDlg(System::Windows::Forms::IWin32Window^);
public: System::Void ShowWindow(System::Windows::Forms::IWin32Window^ owner)
{
if ( this->InvokeRequired )
{
ShowWindowDlg ^dl = gcnew ShowWindowDlg(this, &CPM::ShowWindow);
this->Invoke(dl, gcnew array<System::Object^>{ owner });
}
else
this->Show( owner );
}
But break at the run time

New Topic/Question
Reply


MultiQuote


|