Visual Studio 2008 Express Edition ¤Ç¥È¥é¥ó¥×¥²¡¼¥à¤òºî¤í¤¦
2ÆüÌܤγؽ¬
¥¡¡1ÌܤΤ¤òÄûÀµ¤·¤Þ¤¹ÀÖ»ú
/// ɬÍפʥǥ¶¥¤¥ÊÊÑ¿ô¤Ç¤¹¡£
¤Î²¼¤Ç¤¹
/// </summary>
System::ComponentModel::Container ^components;
void DispHai( int nohai,int xx){
Graphics^ gr=this->CreateGraphics();
int X0=10,Y0=1;
String^ filename;
filename="c:\\card\\1_sp.gif";
if(nohai==0 ) filename="c:\\card\\0_r1.gif" ;
//Pen^ pen1=gcnew Pen(col);
if(nohai>0 && nohai<14) filename="c:\\card\\"+nohai+"_sp.gif" ;
if(nohai>100 && nohai<114 ){nohai=nohai-100;
filename="c:\\card\\"+nohai+"_cl.gif" ;}
if(nohai>200 && nohai<214 ){nohai=nohai-200;
filename="c:\\card\\"+nohai+"_di.gif" ;}
if(nohai>300 && nohai<314){nohai=nohai-300;
filename="c:\\card\\"+nohai+"_he.gif" ;}
//¸¶²èÁü¤òº¸¾å¤ËÉÁ²è¤¹¤ë
if(xx==1){
Bitmap^ bmap1; //bmap1¤Î³ÎÊÝ
bmap1=gcnew Bitmap(filename);
gr->DrawImage(bmap1,X0,Y0);
}
if(xx==2){
Bitmap^ bmap2; //bmap2¤Î³ÎÊÝ
bmap2=gcnew Bitmap(filename);
gr->DrawImage(bmap2,X0+100,Y0);
}
if(xx==3){
Bitmap^ bmap3; //bmap3¤Î³ÎÊÝ
bmap3=gcnew Bitmap(filename);
gr->DrawImage(bmap3,X0+200,Y0);
}
if(xx==4){
Bitmap^ bmap4; //bmap4¤Î³ÎÊÝ
bmap4=gcnew Bitmap(filename);
gr->DrawImage(bmap4,X0+300,Y0);
}
if(xx==5){
Bitmap^ bmap5; //bmap5¤Î³ÎÊÝ
bmap5=gcnew Bitmap(filename);
gr->DrawImage(bmap5,X0+400,Y0);
}
}
¦Form1¥Ç¥¶¥¤¥ó¢ª¡¡¡¡button1¤ò¥À¥Ö¥ë¥¯¥ê¥Ã¥¯¤·¤ÆÄûÀµ¡¡ÀÖ¤ÎÉôʬ¤òÄɲÃ
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
DispHai( 0,1);
DispHai( 1,2);
DispHai( 111,3);
DispHai( 212,4);
DispHai( 313,5);
}
¤ò²¡¤·¤Æ¼Â¹Ô¤·¤Æ¤ß¤ë
·ë²Ì
¤³¤ì¤¬É½¼¨¤µ¤ì¤ì¤ÐÀ®¸ù¤Ç¤¹
¸«ËÜ toranpu2.exe toranpu2.zip