Scroll Form



#pragma once

namespace My56 {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
///
/// 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.
///

public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
protected:
///
/// Clean up any resources being used.
///

~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::Button^ BtnScrollForm;
private: System::Windows::Forms::PictureBox^ PctImage;
protected:
protected:
protected:
private:
///
/// Required designer variable.
///

System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///

void InitializeComponent(void)
{
System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid));
this->BtnScrollForm = (gcnew System::Windows::Forms::Button());
this->PctImage = (gcnew System::Windows::Forms::PictureBox());
(cli::safe_cast
(this->PctImage))->BeginInit();
this->SuspendLayout();
//
// BtnScrollForm
//
this->BtnScrollForm->Location = System::Drawing::Point(12, 12);
this->BtnScrollForm->Name = L"BtnScrollForm";
this->BtnScrollForm->Size = System::Drawing::Size(332, 45);
this->BtnScrollForm->TabIndex = 0;
this->BtnScrollForm->Text = L"Scroll Form";
this->BtnScrollForm->UseVisualStyleBackColor = true;
this->BtnScrollForm->Click += gcnew System::EventHandler(this, &Form1::BtnScrollForm_Click);
//
// PctImage
//
this->PctImage->Image = (cli::safe_cast
(resources->GetObject(L"PctImage.Image")));
this->PctImage->Location = System::Drawing::Point(13, 73);
this->PctImage->Name = L"PctImage";
this->PctImage->Size = System::Drawing::Size(715, 344);
this->PctImage->TabIndex = 1;
this->PctImage->TabStop = false;
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(357, 125);
this->Controls->Add(this->PctImage);
this->Controls->Add(this->BtnScrollForm);
this->Name = L"Form1";
this->Text = L"Form1";
this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
(cli::safe_cast
(this->PctImage))->EndInit();
this->ResumeLayout(false);
}
#pragma endregion
//Scroll Form
private: System::Void BtnScrollForm_Click(System::Object^ sender, System::EventArgs^ e) {
this->AutoScroll=true;
}
private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
this->Text="Scroll Form";
this->BackColor=Color::AliceBlue;
this->MaximizeBox=false;
BtnScrollForm->BackColor=Color::Black;
BtnScrollForm->ForeColor=Color::White;
}
};
}