Visual Studio 2005スレ Part8at TECH
Visual Studio 2005スレ Part8 - 暇つぶし2ch912:843
06/01/30 11:50:49
//チラシの裏。
//Visual C++2005 Express Edition
//Form1にButton1 と Label1 と pictureBox1を貼り付ける。
// Button1をダブルクリックした所のbutton1_Clickに次のコードを書く。

label1->Text = L"押されました";

Graphics^ g;
Pen^ p;

int nw , nh;
nw = pictureBox1->Width ;
nh = pictureBox1->Height ;

p= gcnew Pen(Color::Black ,3);
pictureBox1->Image = gcnew Bitmap(nw , nh );
g = Graphics::FromImage (pictureBox1->Image );
g->DrawRectangle (p,0,0,nw , nh );
g->DrawLine(Pens::Blue , 0 , nh , nw/2 , nh/2 );
g->DrawLine(Pens::Blue , nw/2 , nh/2 , nw , nh);
pictureBox1->Refresh();



次ページ
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch