Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. ///// MyForm.cpp /////////
  2.  
  3. int main(void)
  4. {
  5. Application::EnableVisualStyles();
  6. Application::SetCompatibleTextRenderingDefault(false);
  7.  
  8. CppWinForm3::MyForm^ first = gcnew CppWinForm3::MyForm(); ///// le doy un nombre de referencia al formulario (ventana)
  9.  
  10. first->FormClosed += gcnew FormClosedEventHandler(ExitWhenLastWindowClosed); /// le digo que cierre la aplicacion si se cumple
  11. first->Show(); ///// abro la ventana
  12. Application::Run();
  13. return 0;
  14. }
  15.  
  16. Esto anda todo bien , ahora , lo que quiero hacer es cerrar esa ventana desde otro archivo cuando ejecuta una funcion , que seria esta
  17.  
  18. if (fusername == user & fpassword == pass) {
  19. bool success = 1;
  20. CppWinForm3::MainForm ^ mainform = gcnew CppWinForm3::MainForm(); //// defino la nueva ventana
  21. mainform->Show(); ////// la abro
  22. CppWinForm3::MyForm^ first = gcnew CppWinForm3::MyForm(); /// ESTE ES EL PROBLEMA , cuando quiero definir esta me tira este error 'MyForm': is not a member of 'CppWinForm3' ///////////
  23. first1->Close();
  24. return success;
  25.  
  26. }
  27.  
  28. No se si tenes idea que sera , busque en internet y no encontre nada
  29. Si necesitas mas codigo decime
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement