G
Geoff Cox
Hello,
I am trying to get a grip on where to place the initialization of two
arrays in the code below which was created using Visual C++ 2005
Express Beta 2...
private: static array<String^>^ LHSquestions = gcnew array<String^>
{"question 1","question 2"};
private: static array<String^>^ RHSquestions = gcnew array<String^>
{"question 1",
"question 2"};
I had assumed that I would add them after the other private lines
below? Any suggestions for a beginner's Internet tutorial or book on
using C++ Express language?
Cheers
Geoff
!
#pragma once
namespace trackbar1
{
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System:ata;
using namespace System:rawing;
/// <summary>
/// Summary for Form1
///
/// 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.
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
protected:
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">"description of the
parameter"</param>
virtual void Dispose(Boolean disposing) override
{
if (disposing && components)
{
delete components;
}
__super:ispose(disposing);
}
private: System::Windows::Forms::TrackBar^ trackBar1;
protected:
private: System::Windows::Forms:ictureBox^ pictureBox1;
private: System::Windows::Forms::Label^ label1;
private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::Button^ button1;
private:
/// <summary>
/// Required designer variable.
/// </summary>
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not
modify
/// the contents of this method with the code editor.
/// </summary>
void InitializeComponent(void)
{
System::ComponentModel::ComponentResourceManager^ resources = (gcnew
System::ComponentModel::ComponentResourceManager(Form1::typeid));
this->trackBar1 = (gcnew
System::Windows::Forms::TrackBar());
this->pictureBox1 = (gcnew
System::Windows::Forms:ictureBox());
this->label1 = (gcnew
System::Windows::Forms::Label());
this->label2 = (gcnew
System::Windows::Forms::Label());
this->button1 = (gcnew
System::Windows::Forms::Button());
(cli::safe_cast<System::ComponentModel::ISupportInitialize^
//
// trackBar1
//
this->trackBar1->Location =
System:rawing:oint(90, 168);
this->trackBar1->Name = L"trackBar1";
this->trackBar1->Size =
System:rawing::Size(104, 45);
this->trackBar1->TabIndex = 0;
//
// pictureBox1
//
this->pictureBox1->Image =
(cli::safe_cast<System:rawing::Image^
System:rawing:oint(37, 13);
this->pictureBox1->Name = L"pictureBox1";
this->pictureBox1->Size =
System:rawing::Size(212, 134);
this->pictureBox1->TabIndex = 1;
this->pictureBox1->TabStop = false;
//
// label1
//
this->label1->AutoSize = true;
this->label1->Location =
System:rawing:oint(27, 182);
this->label1->Name = L"label1";
this->label1->Size = System:rawing::Size(31,
13);
this->label1->TabIndex = 2;
this->label1->Text = L"label1";
//
// label2
//
this->label2->AutoSize = true;
this->label2->Location =
System:rawing:oint(230, 182);
this->label2->Name = L"label2";
this->label2->Size = System:rawing::Size(31,
13);
this->label2->TabIndex = 3;
this->label2->Text = L"label2";
//
// button1
//
this->button1->Location =
System:rawing:oint(100, 219);
this->button1->Name = L"button1";
this->button1->Size =
System:rawing::Size(75, 23);
this->button1->TabIndex = 4;
this->button1->Text = L"NEXT";
//
// Form1
//
this->AutoScaleDimensions =
System:rawing::SizeF(6, 13);
this->AutoScaleMode =
System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System:rawing::Size(292,
266);
this->Controls->Add(this->button1);
this->Controls->Add(this->label2);
this->Controls->Add(this->label1);
this->Controls->Add(this->pictureBox1);
this->Controls->Add(this->trackBar1);
this->Name = L"Form1";
this->Text = L"Form1";
(cli::safe_cast<System::ComponentModel::ISupportInitialize^
this->PerformLayout();
}
#pragma endregion
};
}
I am trying to get a grip on where to place the initialization of two
arrays in the code below which was created using Visual C++ 2005
Express Beta 2...
private: static array<String^>^ LHSquestions = gcnew array<String^>
{"question 1","question 2"};
private: static array<String^>^ RHSquestions = gcnew array<String^>
{"question 1",
"question 2"};
I had assumed that I would add them after the other private lines
below? Any suggestions for a beginner's Internet tutorial or book on
using C++ Express language?
Cheers
Geoff
!
#pragma once
namespace trackbar1
{
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System:ata;
using namespace System:rawing;
/// <summary>
/// Summary for Form1
///
/// 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.
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
protected:
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">"description of the
parameter"</param>
virtual void Dispose(Boolean disposing) override
{
if (disposing && components)
{
delete components;
}
__super:ispose(disposing);
}
private: System::Windows::Forms::TrackBar^ trackBar1;
protected:
private: System::Windows::Forms:ictureBox^ pictureBox1;
private: System::Windows::Forms::Label^ label1;
private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::Button^ button1;
private:
/// <summary>
/// Required designer variable.
/// </summary>
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not
modify
/// the contents of this method with the code editor.
/// </summary>
void InitializeComponent(void)
{
System::ComponentModel::ComponentResourceManager^ resources = (gcnew
System::ComponentModel::ComponentResourceManager(Form1::typeid));
this->trackBar1 = (gcnew
System::Windows::Forms::TrackBar());
this->pictureBox1 = (gcnew
System::Windows::Forms:ictureBox());
this->label1 = (gcnew
System::Windows::Forms::Label());
this->label2 = (gcnew
System::Windows::Forms::Label());
this->button1 = (gcnew
System::Windows::Forms::Button());
(cli::safe_cast<System::ComponentModel::ISupportInitialize^
this->SuspendLayout();(this->trackBar1))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^
(this->pictureBox1))->BeginInit();
//
// trackBar1
//
this->trackBar1->Location =
System:rawing:oint(90, 168);
this->trackBar1->Name = L"trackBar1";
this->trackBar1->Size =
System:rawing::Size(104, 45);
this->trackBar1->TabIndex = 0;
//
// pictureBox1
//
this->pictureBox1->Image =
(cli::safe_cast<System:rawing::Image^
this->pictureBox1->Location =(resources->GetObject(L"pictureBox1.Image")));
System:rawing:oint(37, 13);
this->pictureBox1->Name = L"pictureBox1";
this->pictureBox1->Size =
System:rawing::Size(212, 134);
this->pictureBox1->TabIndex = 1;
this->pictureBox1->TabStop = false;
//
// label1
//
this->label1->AutoSize = true;
this->label1->Location =
System:rawing:oint(27, 182);
this->label1->Name = L"label1";
this->label1->Size = System:rawing::Size(31,
13);
this->label1->TabIndex = 2;
this->label1->Text = L"label1";
//
// label2
//
this->label2->AutoSize = true;
this->label2->Location =
System:rawing:oint(230, 182);
this->label2->Name = L"label2";
this->label2->Size = System:rawing::Size(31,
13);
this->label2->TabIndex = 3;
this->label2->Text = L"label2";
//
// button1
//
this->button1->Location =
System:rawing:oint(100, 219);
this->button1->Name = L"button1";
this->button1->Size =
System:rawing::Size(75, 23);
this->button1->TabIndex = 4;
this->button1->Text = L"NEXT";
//
// Form1
//
this->AutoScaleDimensions =
System:rawing::SizeF(6, 13);
this->AutoScaleMode =
System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System:rawing::Size(292,
266);
this->Controls->Add(this->button1);
this->Controls->Add(this->label2);
this->Controls->Add(this->label1);
this->Controls->Add(this->pictureBox1);
this->Controls->Add(this->trackBar1);
this->Name = L"Form1";
this->Text = L"Form1";
(cli::safe_cast<System::ComponentModel::ISupportInitialize^
this->ResumeLayout(false);(this->trackBar1))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^
(this->pictureBox1))->EndInit();
this->PerformLayout();
}
#pragma endregion
};
}