473,569 Members | 2,688 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Visual C# to Visual C++ ??!!

Hello,

After much effort I have got the Visual C# code below to work using
Visual C# 2005 Express Beta 2 and now I am trying to convert it to
Visual C++ code so that I can use it in Visual C++ 2005 Express Beta
2.

My reason for doing this is that I believe (do tell me if I am wrong!)
that using Visual C++ 2005 Express together with the Windows SDK I
will be able to create a Win32 app which will mean that when this app
is installed on a PC the .NET Framework will not be needed ..... Since
my app is so small it seems foolish to require installation of 20 MB
plus of .NET Framework software ....

So, I am looking for Internet site where I might find help in
converting my code to Visual C++. Visual C++ for beginners needed!

Any ideas please?!

Cheers

Geoff
------------------- Visual C# coce -------------------------
using System;
using System.Collecti ons.Generic;
using System.Componen tModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.IO;
using System.Windows. Forms;

namespace slider3
{
public partial class Form1 : Form
{

private string[] LHSquestions;
private string[] RHSquestions;
private int qnumber = 0;
private string[] results;
private int count = 0;

public Form1()
{
InitializeCompo nent();

LHSquestions = new string[]{"question 1","question 2"};
RHSquestions = new string[]{"question 1","question 2"};
results = new string[LHSquestions.Le ngth];

this.label1.Tex t = LHSquestions[qnumber];
this.label2.Tex t = RHSquestions[qnumber];

}

private void pictureBox1_Cli ck(object sender, EventArgs e)
{

}

private void trackBar1_Scrol l(object sender, EventArgs e)
{

}

private void button1_MouseCl ick(object sender, MouseEventArgs
e)
{

results[qnumber] = trackBar1.Value .ToString();

++qnumber;

if (qnumber == LHSquestions.Le ngth)
{
endMessage();
}
else
{

this.label1.Tex t = LHSquestions[qnumber];
this.label2.Tex t = RHSquestions[qnumber];

}
}

private void endMessage()
{
this.label1.Tex t = "Finished!" ;
this.label2.Tex t = "Thank you";
this.button1.Vi sible = false;

TextWriter tw = new StreamWriter("d :\\a-temp1\\data.txt ");

for (count = 0; count < LHSquestions.Le ngth; count++)
{
tw.WriteLine("q " + (count+1) + " = " + results[count]);
}
tw.Close();

}

private void Form1_Load(obje ct sender, EventArgs e)
{

}
}
}
Nov 17 '05 #1
4 1840
A different perspective Geoff:

Who is going to use your app? If it is not for widespread use, find out if
your Users already have .Net installed. Most people with newish PCs will
have the .Net framework already there.

Chris

<Geoff Cox> wrote in message
news:u0******** *************** *********@4ax.c om...
Hello,

After much effort I have got the Visual C# code below to work using
Visual C# 2005 Express Beta 2 and now I am trying to convert it to
Visual C++ code so that I can use it in Visual C++ 2005 Express Beta
2.

My reason for doing this is that I believe (do tell me if I am wrong!)
that using Visual C++ 2005 Express together with the Windows SDK I
will be able to create a Win32 app which will mean that when this app
is installed on a PC the .NET Framework will not be needed ..... Since
my app is so small it seems foolish to require installation of 20 MB
plus of .NET Framework software ....

So, I am looking for Internet site where I might find help in
converting my code to Visual C++. Visual C++ for beginners needed!

Any ideas please?!

Cheers

Geoff
------------------- Visual C# coce -------------------------
using System;
using System.Collecti ons.Generic;
using System.Componen tModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.IO;
using System.Windows. Forms;

namespace slider3
{
public partial class Form1 : Form
{

private string[] LHSquestions;
private string[] RHSquestions;
private int qnumber = 0;
private string[] results;
private int count = 0;

public Form1()
{
InitializeCompo nent();

LHSquestions = new string[]{"question 1","question 2"};
RHSquestions = new string[]{"question 1","question 2"};
results = new string[LHSquestions.Le ngth];

this.label1.Tex t = LHSquestions[qnumber];
this.label2.Tex t = RHSquestions[qnumber];

}

private void pictureBox1_Cli ck(object sender, EventArgs e)
{

}

private void trackBar1_Scrol l(object sender, EventArgs e)
{

}

private void button1_MouseCl ick(object sender, MouseEventArgs
e)
{

results[qnumber] = trackBar1.Value .ToString();

++qnumber;

if (qnumber == LHSquestions.Le ngth)
{
endMessage();
}
else
{

this.label1.Tex t = LHSquestions[qnumber];
this.label2.Tex t = RHSquestions[qnumber];

}
}

private void endMessage()
{
this.label1.Tex t = "Finished!" ;
this.label2.Tex t = "Thank you";
this.button1.Vi sible = false;

TextWriter tw = new StreamWriter("d :\\a-temp1\\data.txt ");

for (count = 0; count < LHSquestions.Le ngth; count++)
{
tw.WriteLine("q " + (count+1) + " = " + results[count]);
}
tw.Close();

}

private void Form1_Load(obje ct sender, EventArgs e)
{

}
}
}

Nov 17 '05 #2

<Geoff Cox> wrote in message
news:u0******** *************** *********@4ax.c om...
Hello,

After much effort I have got the Visual C# code below to work using
Visual C# 2005 Express Beta 2 and now I am trying to convert it to
Visual C++ code so that I can use it in Visual C++ 2005 Express Beta
2.

My reason for doing this is that I believe (do tell me if I am wrong!)
that using Visual C++ 2005 Express together with the Windows SDK I
will be able to create a Win32 app which will mean that when this app
is installed on a PC the .NET Framework will not be needed ..... Since
my app is so small it seems foolish to require installation of 20 MB
plus of .NET Framework software ....

So, I am looking for Internet site where I might find help in
converting my code to Visual C++. Visual C++ for beginners needed!

Any ideas please?!

Cheers

Geoff
------------------- Visual C# coce -------------------------
using System;
using System.Collecti ons.Generic;
using System.Componen tModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.IO;
using System.Windows. Forms;

namespace slider3
{
public partial class Form1 : Form
{

private string[] LHSquestions;
private string[] RHSquestions;
private int qnumber = 0;
private string[] results;
private int count = 0;

public Form1()
{
InitializeCompo nent();

LHSquestions = new string[]{"question 1","question 2"};
RHSquestions = new string[]{"question 1","question 2"};
results = new string[LHSquestions.Le ngth];

this.label1.Tex t = LHSquestions[qnumber];
this.label2.Tex t = RHSquestions[qnumber];

}

private void pictureBox1_Cli ck(object sender, EventArgs e)
{

}

private void trackBar1_Scrol l(object sender, EventArgs e)
{

}

private void button1_MouseCl ick(object sender, MouseEventArgs
e)
{

results[qnumber] = trackBar1.Value .ToString();

++qnumber;

if (qnumber == LHSquestions.Le ngth)
{
endMessage();
}
else
{

this.label1.Tex t = LHSquestions[qnumber];
this.label2.Tex t = RHSquestions[qnumber];

}
}

private void endMessage()
{
this.label1.Tex t = "Finished!" ;
this.label2.Tex t = "Thank you";
this.button1.Vi sible = false;

TextWriter tw = new StreamWriter("d :\\a-temp1\\data.txt ");

for (count = 0; count < LHSquestions.Le ngth; count++)
{
tw.WriteLine("q " + (count+1) + " = " + results[count]);
}
tw.Close();

}

private void Form1_Load(obje ct sender, EventArgs e)
{

}
}
}


I'm going to second Chris' opinion here. The level of effort needed to
convert a C# Windows application to MFC, ATL or straight Windows API (some
choices available for a C++ Windows application not dependent on the .NET
framework) is significant. There is also a rather steep learning curve
involved.
If you do encounter potential clients that require Framework installation,
bear in mind that you just happen to be the first product requiring it. It's
a matter of when, not if.
The link below is typical of the information available on MFC in MSDN. You
can find many similar articles by searching MSDN for "MFC tutorials". They
should give you some idea of the work involved in converting your
application:

http://msdn.microsoft.com/library/de..._available.asp
--
Peter [MVP Visual Developer]
Jack of all trades, master of none.
Nov 17 '05 #3
On Tue, 16 Aug 2005 10:02:11 +0100, "Chris Ward"
<pr**********@h otmail.com> wrote:
A different perspective Geoff:

Who is going to use your app? If it is not for widespread use, find out if
your Users already have .Net installed. Most people with newish PCs will
have the .Net framework already there.
Chris,

Any idea when .NET started to be found in significant numbers?

Cheers

Geoff


Chris

<Geoff Cox> wrote in message
news:u0******* *************** **********@4ax. com...
Hello,

After much effort I have got the Visual C# code below to work using
Visual C# 2005 Express Beta 2 and now I am trying to convert it to
Visual C++ code so that I can use it in Visual C++ 2005 Express Beta
2.

My reason for doing this is that I believe (do tell me if I am wrong!)
that using Visual C++ 2005 Express together with the Windows SDK I
will be able to create a Win32 app which will mean that when this app
is installed on a PC the .NET Framework will not be needed ..... Since
my app is so small it seems foolish to require installation of 20 MB
plus of .NET Framework software ....

So, I am looking for Internet site where I might find help in
converting my code to Visual C++. Visual C++ for beginners needed!

Any ideas please?!

Cheers

Geoff
------------------- Visual C# coce -------------------------
using System;
using System.Collecti ons.Generic;
using System.Componen tModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.IO;
using System.Windows. Forms;

namespace slider3
{
public partial class Form1 : Form
{

private string[] LHSquestions;
private string[] RHSquestions;
private int qnumber = 0;
private string[] results;
private int count = 0;

public Form1()
{
InitializeCompo nent();

LHSquestions = new string[]{"question 1","question 2"};
RHSquestions = new string[]{"question 1","question 2"};
results = new string[LHSquestions.Le ngth];

this.label1.Tex t = LHSquestions[qnumber];
this.label2.Tex t = RHSquestions[qnumber];

}

private void pictureBox1_Cli ck(object sender, EventArgs e)
{

}

private void trackBar1_Scrol l(object sender, EventArgs e)
{

}

private void button1_MouseCl ick(object sender, MouseEventArgs
e)
{

results[qnumber] = trackBar1.Value .ToString();

++qnumber;

if (qnumber == LHSquestions.Le ngth)
{
endMessage();
}
else
{

this.label1.Tex t = LHSquestions[qnumber];
this.label2.Tex t = RHSquestions[qnumber];

}
}

private void endMessage()
{
this.label1.Tex t = "Finished!" ;
this.label2.Tex t = "Thank you";
this.button1.Vi sible = false;

TextWriter tw = new StreamWriter("d :\\a-temp1\\data.txt ");

for (count = 0; count < LHSquestions.Le ngth; count++)
{
tw.WriteLine("q " + (count+1) + " = " + results[count]);
}
tw.Close();

}

private void Form1_Load(obje ct sender, EventArgs e)
{

}
}
}


Nov 17 '05 #4
On Tue, 16 Aug 2005 07:45:20 -0500, "Peter van der Goes"
<p_**********@t oadstool.u> wrote:
I'm going to second Chris' opinion here. The level of effort needed to
convert a C# Windows application to MFC, ATL or straight Windows API (some
choices available for a C++ Windows application not dependent on the .NET
framework) is significant. There is also a rather steep learning curve
involved.
If you do encounter potential clients that require Framework installation,
bear in mind that you just happen to be the first product requiring it. It's
a matter of when, not if.
The link below is typical of the information available on MFC in MSDN. You
can find many similar articles by searching MSDN for "MFC tutorials". They
should give you some idea of the work involved in converting your
application:
Peter,

Thanks for the advice and the link.

Cheers

Geoff

http://msdn.microsoft.com/library/de..._available.asp


Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
6161
by: Martin Bless | last post by:
The good news: Along with Python-2.4 comes really good news to Windows users. Yes, you now CAN build extension modules yourself using the SAME C++ compiler and linker Python is built with itself. Everything you need is available at no costs (except download hassle and installation time). Once your system is set up properly its just a matter...
0
6100
by: Tom Lee | last post by:
Hi, I'm new to .NET 2003 compiler. When I tried to compile my program using DEBUG mode, I got the following errors in the C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 \include\xdebug file as folows. I need help to resolve them ASAP: cl /c /nologo /MDd /W3 /Od /GR /GM /Zi /GX /D "_DEBUG" /D " WIN32" /D "_W INDOWS" /D "_WINDLL"...
0
2575
by: gerd | last post by:
Hello, I want to port an MFC Application from Visual Studio 6 MFC application to Visual C++ 2005 express edition beta. While building i get following error: ------ Build started: Project: OSTDLL, Configuration: Debug Win32 ------ Compiling... StdAfx.cpp
1
2525
by: Daniel A. Thomas | last post by:
License required Maybe you don't have this but have one of the products that qualifies for the upgrade such as ... Visual Studio .NET 2003 Professional Visual Studio .NET 2003 Professional Special Edition Visual Studio .NET 2003 Enterprise Architect Visual Studio .NET 2003 Enterprise Developer Visual Studio .NET 2002 Professional Edition
3
6046
by: Edwin Smith | last post by:
I have a 2 form project in VS2005 that now hangs whenever I try to do anything with the second form. This seems to have started when I added some SQL tables from a Pervasive v.9 database using the Pervasive ODBC driver. The devenv.exe process hangs and will not respond with about 50% cpu usage and about 100 megs of memory used. I am...
1
3586
by: johnlim20088 | last post by:
Hi, Currently I have 6 web projects located in Visual Source Safe 6.0, as usual, everytime I will open solution file located in my local computer, connected to source safe, then check out/check in some files and work on it. Let say, I want add new page to web project named websiteOrder.sln, i will open websiteOrder.sln in my local computer,...
0
6657
by: marathoner | last post by:
I am currently migrating my Visual C++ 6.0 applications to Visual Studio 2005. I am getting compiler errors involving the VS2005's platform SDK. When I removed directory references to that SDK, and started using the Microsoft Platform SDK for XP SP2, the errors disappeared, but I am now getting numerous warnings (macro redefinitions) as...
2
3384
by: Cramer | last post by:
So, what is the relationship between Visual Studio and Visual Web Developer. I find a lot of documentation on MSDN that presents Visual Web Developer as it's own stand-alone product (which I'd expect of the Express editions), but apparently there are NON Express versions of Visual Web Developer. Is Visual Web Developer only built-in to...
0
7312
jwwicks
by: jwwicks | last post by:
Introduction This tutorial describes how to use Visual Studio to create a new C++ program, compile/run a program, resume work on an existing program and debug a program. It is aimed at the beginning CIS student who is struggling to get their programs working. I work in the computer lab at the college I'm attending and I see many students who...
3
10494
by: Johnson | last post by:
I'm not sure if this is an IIS 5.1 issue or ASP.NET issue, or Visual Studio 2008 issue -- thus posting to 3 groups. Please don't be offended. The problem I'm encountering is that Visual Studio closes unexpectedly and without any error message being displayed, or error messages written to the system logs. Visual Studio closes when I attempt...
0
7618
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7679
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6287
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5223
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3657
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2117
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
946
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.