![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Nov 2004
Posts: 10
Rep Power: 0
![]() |
Creating .NET applications using visual c++ express.
Now i did do alot of reading and googling but i cant seem to find anything. Microsoft says you can but they dont tell you how. Anybody care to explain what i should do.
|
|
|
|
|
|
#2 |
|
Newbie
Join Date: Aug 2005
Location: Romania
Posts: 13
Rep Power: 0
![]() |
I think they are named CLR projects.
|
|
|
|
|
|
#3 |
|
Expert Programmer
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4
![]() |
Maybe i'm missing something but if you have Visual Studio 2003 .NET, go to File-->New-->Project. When the dialog box pops up, choose Visual C++ projects to the left and Empty Project (.NET) to the right.
EDIT: I see that you're using VC++ Express. Nevermind. |
|
|
|
|
|
#4 | |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
File | New | Project.
Under "Visual C++", click CLR. There are a number of templates to select from, I chose "CLR Console Application". I then chose the Name:, "Experiment", and clicked "OK". This is what I got: // Experiment.cpp : main project file.
#include "stdafx.h"
using namespace System;
int main(array<System::String ^> ^args)
{
Console::WriteLine(L"Hello World");
return 0;
}I then moved "Experiment.exe" from C:\Documents and Settings\David\My Documents\Visual Studio\Projects\Experiment\debug to the desktop, opened a command prompt, changed directories to the desktop, and entered the command, Experiment What you see below is what I got. Quote:
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
|
#5 |
|
Newbie
Join Date: Nov 2004
Posts: 10
Rep Power: 0
![]() |
Heres the error that im getting. Do i need to update .NET platform or download a new compiler. Because im using VC++ Beta2.
------ Build started: Project: Experiment, Configuration: Debug Win32 ------ Compiling... stdafx.cpp .\stdafx.cpp : warning C4379: Version 2.0.50727.42 of the common language runtime is not supported by this compiler. Using this version may cause unexpected results predefined C++ types (compiler internal)(12) : fatal error C1205: Generics are not supported by the version of the runtime installed Build log was saved at "file://c:\My Documents\Visual Studio 2005\Projects\Experiment\Experiment\Debug\BuildLog.htm" Experiment - 1 error(s), 1 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== |
|
|
|
|
|
#6 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Beta 2 is precisely what I used. Maybe you need a net framework update. That's what the error message seems to imply, anyway. May as well download the latest version of the compiler, too. It's free.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#7 |
|
Expert Programmer
|
i can update my vc++ compiler?
__________________
"When in Rome, Do as the Romans Do" "Beauty is in the eye of the BEER holder" "Save your breath your going to need it for your blow up doll later" SearchLores.org |
|
|
|
|
|
#8 | |
|
Newbie
Join Date: Nov 2004
Posts: 10
Rep Power: 0
![]() |
Yay it works. All i really wanted out of this was to make a simple gui. Should i stick with this or just learn MFC?
And now this code isnt working. #include "stdafx.h"
using System;
using System.Windows.Forms;
class App{
public static void Main(){
Application.Run(new SomeForm());
}
}
class SomeForm:Form{
public SomeForm(){
Button button = new Button();
button.Text = "My Button";
button.Click += new EventHandler(OnClick);
this.Controls.Add(button);
this.FormBorderStyle = FormBorderStyle.Fixed3D;
}
void OnClick(Object sender, EventArgs args){
MessageBox.Show("The Button Was Clicked!");
}
}Quote:
Last edited by Gradius; Nov 25th, 2005 at 10:21 PM. |
|
|
|
|
|
|
#9 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
The secret to getting good help is the same as the secret to debugging -- information. "This code isn't working" doesn't really hack it. You're asking for people to take time to analyze your code AND your mind. Maybe someone will guess at what it's supposed to do and figure out why it isn't.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|