Click here to Skip to main content
15,910,009 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: get system time Pin
Christian Graus19-Mar-07 7:37
protectorChristian Graus19-Mar-07 7:37 
AnswerRe: get system time Pin
prasad_som19-Mar-07 7:40
prasad_som19-Mar-07 7:40 
GeneralRe: get system time Pin
shamsteady19-Mar-07 7:46
shamsteady19-Mar-07 7:46 
QuestionHow to communicate with USB devices from VC++.NET code? Pin
lafleon16-Mar-07 12:01
lafleon16-Mar-07 12:01 
QuestionC++/CLI assemblies on machines without VC2005 installed Pin
satankidneypie16-Mar-07 4:26
satankidneypie16-Mar-07 4:26 
AnswerRe: C++/CLI assemblies on machines without VC2005 installed Pin
Mark Salsbery16-Mar-07 8:41
Mark Salsbery16-Mar-07 8:41 
QuestionIs TCPListener Component Sufficient For Communication Over GPRS Channel?Is TCPListener Component Sufficient For Communication Over GPRS Channel? Pin
Nonreturn16-Mar-07 3:31
Nonreturn16-Mar-07 3:31 
Questionloading a new form (windows form application) - vc++ 2005 Pin
luhfluh16-Mar-07 3:27
luhfluh16-Mar-07 3:27 
Hi to all, I'm new to vc++ and I've read a bit on how to create a new form and load it (make it appear on screen). But i have this code and its corresponding error and would be glad if someone could point me in the right direction.
There's three forms, Form1 (login form) and gymMain a main interface. So what I tried to do is first load the application with gymMain and make its Visible state FALSE, next load Form1 (login) and upon confirmation of input, close Form1 and make gymMain visible. Now I try this with the below code and the erorr is shown below. All help/suggestions appreaciated.
regards

PS: I'm prety sure I used the header files appropriately but one never knows, ...

--------------------------
code for Main application:
--------------------------
// GymManager.cpp : main project file.

#include "stdafx.h"
#include "Form1.h"
#include "gymMain.h"
#include "NewMember.h"
#include "search.h"

using namespace GymManager;
//using namespace Form1;
//using namespace gymMain;
//using namespace NewMember;
//using namespace search;

[STAThreadAttribute]
int main(array ^args)
{
// Enabling Windows XP visual effects before any controls are created
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);

// Create the main window and run it
Application::Run(gcnew gymMain());
return 0;
}
----------------------------------------


code for gymMain:
----------------------------------
#pragma once
#include "NewMember.h"
#include "Form1.h"

using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
using namespace System::Globalization;
using namespace GymManager;



namespace GymManager {

///
/// Summary for gymMain
///
/// WARNING: If you change the name of this class, you will need to change the
/// 'Resource File Name' property for the managed resource compiler tool
/// associated with all .resx files this class depends on. Otherwise,
/// the designers will not be able to interact properly with localized
/// resources associated with this form.
///

//
//// code for constructor and object declarations and initializations
//

#pragma endregion
private: System::Void btnNewM_Click(System::Object^ sender, System::EventArgs^ e) {
// gymMain::Visible = false;
// GymManager::NewMember ^newM = gcnew GymManager::NewMember;
// newM->Show();
}
private: System::Void gymMain_Load(System::Object^ sender, System::EventArgs^ e) {
//load login page and make main page invisible
this->Visible = false;
GymManager::Form1 ^login = gcnew GymManager::Form1;
login->Show();

//display clock
DateTime^ dt = DateTime::Now;
String^ date;
date = dt->ToString();
lDateShow->Text = date;

}

};
}

-------------------------------

error messages displayed:
-------------------------------
c:\documents and settings\and_one\my documents\visual studio 2005\cs208\gymmanager\gymmanager\gymMain.h(282) : error C2039: 'Form1' : is not a member of 'GymManager'
c:\documents and settings\and_one\my documents\visual studio 2005\cs208\gymmanager\gymmanager\gymMain.h(282) : error C2065: 'Form1' : undeclared identifier
c:\documents and settings\and_one\my documents\visual studio 2005\cs208\gymmanager\gymmanager\gymMain.h(282) : error C2065: 'login' : undeclared identifier
c:\documents and settings\and_one\my documents\visual studio 2005\cs208\gymmanager\gymmanager\gymMain.h(282) : error C2039: 'Form1' : is not a member of 'GymManager'
c:\documents and settings\and_one\my documents\visual studio 2005\cs208\gymmanager\gymmanager\gymMain.h(282) : error C2061: syntax error : identifier 'Form1'
c:\documents and settings\and_one\my documents\visual studio 2005\cs208\gymmanager\gymmanager\gymMain.h(283) : error C2227: left of '->Show' must point to class/struct/union/generic type
type is ''unknown-type''

luhfluh

AnswerRe: loading a new form (windows form application) - vc++ 2005 Pin
prasad_som16-Mar-07 3:35
prasad_som16-Mar-07 3:35 
QuestionGet data from dataGrid Pin
webHamlet15-Mar-07 19:38
webHamlet15-Mar-07 19:38 
AnswerRe: Get data from dataGrid Pin
Paul Conrad13-Jul-07 13:49
professionalPaul Conrad13-Jul-07 13:49 
QuestionGlobal Hit Test Pin
Sydes15-Mar-07 1:28
Sydes15-Mar-07 1:28 
AnswerRe: Global Hit Test Pin
Sydes15-Mar-07 1:30
Sydes15-Mar-07 1:30 
QuestionMissingManifestResourceException Pin
Ralph A. Moritz14-Mar-07 23:27
Ralph A. Moritz14-Mar-07 23:27 
AnswerRe: MissingManifestResourceException Pin
Ralph A. Moritz15-Mar-07 2:00
Ralph A. Moritz15-Mar-07 2:00 
QuestionHow Can I Get Text From Other Application ? Pin
ngooduwcs14-Mar-07 17:05
ngooduwcs14-Mar-07 17:05 
AnswerRe: How Can I Get Text From Other Application ? Pin
Christian Graus14-Mar-07 18:11
protectorChristian Graus14-Mar-07 18:11 
QuestionAMX Pin
klutez12314-Mar-07 16:30
klutez12314-Mar-07 16:30 
AnswerRe: AMX Pin
Christian Graus14-Mar-07 18:11
protectorChristian Graus14-Mar-07 18:11 
GeneralRe: AMX Pin
klutez12315-Mar-07 2:45
klutez12315-Mar-07 2:45 
QuestionUI Freeze during multithreading. Driving me crazy!!! :) Pin
fharkness14-Mar-07 11:12
fharkness14-Mar-07 11:12 
QuestionRe: UI Freeze during multithreading. Driving me crazy!!! :) Pin
fharkness15-Mar-07 2:27
fharkness15-Mar-07 2:27 
AnswerRe: UI Freeze during multithreading. Driving me crazy!!! :) Pin
Daniel Grunwald16-Mar-07 2:03
Daniel Grunwald16-Mar-07 2:03 
QuestionGetting #include to work Pin
Stick^14-Mar-07 10:56
Stick^14-Mar-07 10:56 
AnswerRe: Getting #include to work Pin
Christian Graus14-Mar-07 12:16
protectorChristian Graus14-Mar-07 12:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.