C
Charles
Hello Everyone,
I have been gettting great feedback from microsoft.public.vc.language
group but after doing more searching I think my post should be directed
to this group.
I am trying to make a simple gif animation using VC++ and 13 different
gif files and a timer.
I am new to VC++ but played around with C++ for a few years. I am
using Microsoft Visual Studio 2005 (VC++).
Before I was using 13 different picturebox controls but have been told
that I should use a picturebox array instead.
I have found many exmaples on how to make a String array however I am
having a difficult time changing a picturebox control into a picturebox
array. I have started a new form and a single picturebox control. I
have been trying to figure out how to change the declaration to make it
into an array. However, I have had no luck this far. Below is a cut
and paste
of the new form with a single picturebox. If anyone could help me to
understand how to accomplish this I would be grateful.
Thank you,
Charles
--------------------------------------------------------------
#pragma once
namespace ex {
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>
~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms:ictureBox^ pictureBox1;
protected:
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)
{
this->pictureBox1 = (gcnew
System::Windows::Forms:ictureBox());
(cli::safe_cast<System::ComponentModel::ISupportInitialize^
this->SuspendLayout();
//
// pictureBox1
//
this->pictureBox1->Location =
System:rawing:oint(70, 44);
this->pictureBox1->Name = L"pictureBox1";
this->pictureBox1->Size =
System:rawing::Size(100, 50);
this->pictureBox1->TabIndex = 0;
this->pictureBox1->TabStop = false;
this->pictureBox1->Click += gcnew
System::EventHandler(this,
&Form1:ictureBox1_Click);
//
// Form1
//
this->AutoScaleDimensions =
System:rawing::SizeF(6, 13);
this->AutoScaleMode =
System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System:rawing::Size(295,
266);
this->Controls->Add(this->pictureBox1);
this->Name = L"Form1";
this->Text = L"Form1";
(cli::safe_cast<System::ComponentModel::ISupportInitialize^
this->ResumeLayout(false);
}
#pragma endregion
private: System::Void pictureBox1_Click(System::Object^
sender,
System::EventArgs^ e) {
}
};
I have been gettting great feedback from microsoft.public.vc.language
group but after doing more searching I think my post should be directed
to this group.
I am trying to make a simple gif animation using VC++ and 13 different
gif files and a timer.
I am new to VC++ but played around with C++ for a few years. I am
using Microsoft Visual Studio 2005 (VC++).
Before I was using 13 different picturebox controls but have been told
that I should use a picturebox array instead.
I have found many exmaples on how to make a String array however I am
having a difficult time changing a picturebox control into a picturebox
array. I have started a new form and a single picturebox control. I
have been trying to figure out how to change the declaration to make it
into an array. However, I have had no luck this far. Below is a cut
and paste
of the new form with a single picturebox. If anyone could help me to
understand how to accomplish this I would be grateful.
Thank you,
Charles
--------------------------------------------------------------
#pragma once
namespace ex {
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>
~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms:ictureBox^ pictureBox1;
protected:
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)
{
this->pictureBox1 = (gcnew
System::Windows::Forms:ictureBox());
(cli::safe_cast<System::ComponentModel::ISupportInitialize^
(this->pictureBox1))->BeginInit();
this->SuspendLayout();
//
// pictureBox1
//
this->pictureBox1->Location =
System:rawing:oint(70, 44);
this->pictureBox1->Name = L"pictureBox1";
this->pictureBox1->Size =
System:rawing::Size(100, 50);
this->pictureBox1->TabIndex = 0;
this->pictureBox1->TabStop = false;
this->pictureBox1->Click += gcnew
System::EventHandler(this,
&Form1:ictureBox1_Click);
//
// Form1
//
this->AutoScaleDimensions =
System:rawing::SizeF(6, 13);
this->AutoScaleMode =
System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System:rawing::Size(295,
266);
this->Controls->Add(this->pictureBox1);
this->Name = L"Form1";
this->Text = L"Form1";
(cli::safe_cast<System::ComponentModel::ISupportInitialize^
(this->pictureBox1))->EndInit();
this->ResumeLayout(false);
}
#pragma endregion
private: System::Void pictureBox1_Click(System::Object^
sender,
System::EventArgs^ e) {
}
};