#pragma once
namespace Project1 {
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>
/// MyForm の概要
/// </summary>
public ref class MyForm : public System::Windows::Forms::Form
{
public:
MyForm(void)
{
InitializeComponent();
//
//TODO: ここにコンストラクター コードを追加します
//
}
protected:
/// <summary>
/// 使用中のリソースをすべてクリーンアップします。
/// </summary>
~MyForm()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::NumericUpDown^ numericUpDown1;
private: System::Windows::Forms::ProgressBar^ progressBar1;
protected:
protected:
protected:
private:
/// <summary>
/// 必要なデザイナー変数です。
/// </summary>
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
/// <summary>
/// デザイナー サポートに必要なメソッドです。このメソッドの内容を
/// コード エディターで変更しないでください。
/// </summary>
void InitializeComponent(void)
{
this->numericUpDown1 = (gcnew
System::Windows::Forms::NumericUpDown());
this->progressBar1 = (gcnew System::Windows::Forms::ProgressBar());
(cli::safe_cast<System::ComponentModel::ISupportInitialize^
>(this->numericUpDown1))->BeginInit();
this->SuspendLayout();
//
// numericUpDown1
//
this->numericUpDown1->Font = (gcnew System::Drawing::Font(L"MS UI
Gothic", 16, System::Drawing::FontStyle::Bold,
System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(128)));
this->numericUpDown1->Location = System::Drawing::Point(76, 76);
this->numericUpDown1->Name = L"numericUpDown1";
this->numericUpDown1->Size = System::Drawing::Size(120, 29);
this->numericUpDown1->TabIndex = 0;
this->numericUpDown1->ValueChanged += gcnew System::EventHandler(this,
&MyForm::numericUpDown1_ValueChanged);
//
// progressBar1
//
this->progressBar1->Location = System::Drawing::Point(76, 161);
this->progressBar1->Name = L"progressBar1";
this->progressBar1->Size = System::Drawing::Size(120, 23);
this->progressBar1->TabIndex = 1;
//
// MyForm
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 12);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(284, 261);
this->Controls->Add(this->progressBar1);
this->Controls->Add(this->numericUpDown1);
this->Name = L"MyForm";
this->Text = L"Hello C++/CLI World !!";
(cli::safe_cast<System::ComponentModel::ISupportInitialize^
>(this->numericUpDown1))->EndInit();
this->ResumeLayout(false);
}
#pragma endregion
private: System::Void numericUpDown1_ValueChanged(System::Object^ sender,
System::EventArgs^ e) {
progressBar1->Value = (int)numericUpDown1->Value;
}
};
}
|