Probleme utilisation Winform VS2005
Bonjour, j'ai un projet de type MVC � faire dans le cadre d'un tp avec deux fen�tres winforms cote � cote.
Pour cela au lieu d'instancier ma premiere fiche depuis le main et la seconde depuis la premi�re, j'instancie ma coucher Controle depuis le main et de la j'instancie les deux winforms mais je ne sais pas comment garder les forms apr�s l'affichages car mon application se termine apr�s leurs affichage.
Le main :
///////////////////////////////////////////////////////////
Citation:
#include "stdafx.h"
#include "Ccontrol.h" //Ma couche controleur
using namespace SupervisionVoiture;
[STAThreadAttribute]
int main(array<System::String ^> ^args)
{
// Activation des effets visuels de Windows*XP avant la cr�ation de tout contr�le
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
Ccontrol^ ctrl = gcnew Ccontrol;
ctrl->run(); //M�thode qui affiche les fen�tres
return 0;
}
////////////////////////////////////////////////////////
Du coter du controleur :
//////////////////////////////////////////////
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| #pragma once
#include "TableauBord.h"
#include "Commande.h"
using namespace SupervisionVoiture;
ref class Ccontrol
{
private :
TableauBord^ tabl;
Commande^ cmd;
public:
Ccontrol(void)
{
tabl = gcnew TableauBord;
cmd = gcnew Commande;
}
void run ()
{
tabl->Show();
cmd->Show();
}
}; |
////////////////////////////////////////////////
Merci de m'aider