G
Geoff Cox
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.Collections.Generic;
using System.ComponentModel;
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()
{
InitializeComponent();
LHSquestions = new string[]{"question 1","question 2"};
RHSquestions = new string[]{"question 1","question 2"};
results = new string[LHSquestions.Length];
this.label1.Text = LHSquestions[qnumber];
this.label2.Text = RHSquestions[qnumber];
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
private void trackBar1_Scroll(object sender, EventArgs e)
{
}
private void button1_MouseClick(object sender, MouseEventArgs
e)
{
results[qnumber] = trackBar1.Value.ToString();
++qnumber;
if (qnumber == LHSquestions.Length)
{
endMessage();
}
else
{
this.label1.Text = LHSquestions[qnumber];
this.label2.Text = RHSquestions[qnumber];
}
}
private void endMessage()
{
this.label1.Text = "Finished!";
this.label2.Text = "Thank you";
this.button1.Visible = false;
TextWriter tw = new StreamWriter("d:\\a-temp1\\data.txt");
for (count = 0; count < LHSquestions.Length; count++)
{
tw.WriteLine("q" + (count+1) + " = " + results[count]);
}
tw.Close();
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
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.Collections.Generic;
using System.ComponentModel;
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()
{
InitializeComponent();
LHSquestions = new string[]{"question 1","question 2"};
RHSquestions = new string[]{"question 1","question 2"};
results = new string[LHSquestions.Length];
this.label1.Text = LHSquestions[qnumber];
this.label2.Text = RHSquestions[qnumber];
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
private void trackBar1_Scroll(object sender, EventArgs e)
{
}
private void button1_MouseClick(object sender, MouseEventArgs
e)
{
results[qnumber] = trackBar1.Value.ToString();
++qnumber;
if (qnumber == LHSquestions.Length)
{
endMessage();
}
else
{
this.label1.Text = LHSquestions[qnumber];
this.label2.Text = RHSquestions[qnumber];
}
}
private void endMessage()
{
this.label1.Text = "Finished!";
this.label2.Text = "Thank you";
this.button1.Visible = false;
TextWriter tw = new StreamWriter("d:\\a-temp1\\data.txt");
for (count = 0; count < LHSquestions.Length; count++)
{
tw.WriteLine("q" + (count+1) + " = " + results[count]);
}
tw.Close();
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}