I am obviously completly lost and am on a totally diffrent page then you are. So with that said if you don't mind please have a look at what I have (which is basicly nothing).....
Code:
#pragma once
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
namespace SlideShow
{
// I think this array is suppose to hold the the location of the three .bmp
char *g_szFilenames[3] = { "C:\\image1.bmp", "C:\\image2.bmp", "C:\\image3.bmp" };
// This will store the index of the filename in use
int g_iCurrentFile = 0;
/// <summary>
/// Summary for SlideShowMain
///
/// 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 __gc class SlideShowMain : public System::Windows::Forms::Form
{
public:
SlideShowMain(void)
{
InitializeComponent();
}
protected:
void Dispose(Boolean disposing)
{
if (disposing && components)
{
components->Dispose();
}
__super::Dispose(disposing);
}
private: System::Windows::Forms::PictureBox * pictureBox1;
private: System::Windows::Forms::Button * button1;
private: System::Windows::Forms::Button * button2;
private:
/// <summary>
/// Required designer variable.
/// </summary>
System::ComponentModel::Container* components;
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
void InitializeComponent(void)
{
System::Resources::ResourceManager * resources = new System::Resources::ResourceManager(__typeof(SlideShow::SlideShowMain));
this->pictureBox1 = new System::Windows::Forms::PictureBox();
this->button1 = new System::Windows::Forms::Button();
this->button2 = new System::Windows::Forms::Button();
this->SuspendLayout();
//
// pictureBox1
//
this->pictureBox1->Image = (__try_cast<System::Drawing::Image * >(resources->GetObject(S"pictureBox1.Image")));
this->pictureBox1->Location = System::Drawing::Point(104, 40);
this->pictureBox1->Name = S"pictureBox1";
this->pictureBox1->TabIndex = 0;
this->pictureBox1->TabStop = false;
//
// button1
//
this->button1->Location = System::Drawing::Point(32, 168);
this->button1->Name = S"button1";
this->button1->TabIndex = 1;
this->button1->Text = S"button1";
this->button1->Click += new System::EventHandler(this, backButton);
//
// button2
//
this->button2->Location = System::Drawing::Point(184, 168);
this->button2->Name = S"button2";
this->button2->TabIndex = 2;
this->button2->Text = S"button2";
this->button2->Click += new System::EventHandler(this, nextButton);
//
// SlideShowMain
//
this->AutoScaleBaseSize = System::Drawing::Size(5, 13);
this->ClientSize = System::Drawing::Size(292, 273);
this->Controls->Add(this->button2);
this->Controls->Add(this->button1);
this->Controls->Add(this->pictureBox1);
this->Name = S"SlideShowMain";
this->Text = S"SlideShowMain";
this->ResumeLayout(false);
}
private: System::Void backButton(System::Object * sender, System::EventArgs * e)
{//This will be used to cycle back
}
private: System::Void nextButton(System::Object * sender, System::EventArgs * e)
{//This will be used to cycle foward
}
};
}
This is obviously my .h file. My .cpp file is set up to initalize this and it works perfect so no worries there. Along with a folder that holds three .bmp, these files are stored together in one "program folder".
At this point with what I have gathered I need to increment or decrement using my int through the array in each the backButton Event Handler or the nextButton Event Handler. Is this correct?
As far as loading the .bmp into the "pictureBox" (sorry for thermonolgy) I still am lost.
Am I on the correct track....
This is a lot harder then I thought it was going to be and I am sorry for being so retarded. I really appreciate all the help you have given me.
Thanks
Chad