前田稔(Maeda Minoru)の超初心者のプログラム入門
ファイル名 | 説明 |
---|---|
PictureBox.cpp | PictureBox を貼付 |
private: Bitmap^ img; System::Windows::Forms::PictureBox^ pictureBox1; |
FormClass() { // pictureBox1 this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox()); this->pictureBox1->Location = System::Drawing::Point(60, 40); this->pictureBox1->Size = System::Drawing::Size(256, 256); this->pictureBox1->SizeMode = System::Windows::Forms::PictureBoxSizeMode::AutoSize; // Form this->Controls->Add(this->pictureBox1); this->Text = L"Pixture Box"; show(); } |
void show() { img = gcnew Bitmap("c:\\data\\test\\kishi.gif"); pictureBox1->Image = img; } |