看板 C_and_CPP 關於我們 聯絡資訊
請問一下,我現在想要做一個功能 在button上按一下,便會新增出一個picturebox 再按一下,又會再新增出一個picturebox 但這兩個picturebox個別的物體 而不是同一個picturebox顯示兩次 請問該怎麼寫呢,目前我是這樣寫的,這是在button內的事件 static int ID=0; ID++; static int x=10; x+=10; static int y=20; y+=10; String^ Place_Name; Place_Name="Place"+ID; Place_ID=gcnew PictureBox(); this->Controls->Add(Place_ID); Place_ID->BackColor=System::Drawing::Color::Transparent; Place_ID->Image =gcnew Bitmap(gcnew String(file_name.c_str())); Place_ID->Location = System::Drawing::Point(x,y); Place_ID->Name = Place_Name; Place_ID->Size = System::Drawing::Size(100,100); Place_ID->SizeMode = System::Windows::Forms::PictureBoxSizeMode::StretchImage; Place_ID->BringToFront(); Place_ID->Visible=true; Place_ID->Click += gcnew System::EventHandler(this, &Form1::Place_ID_Click); 以及如紅色部份,我想讓該圖示背景是透明的,但我這樣打 以及我有對其gif檔做去背動作,但還是沒有用,我要怎麼改呢? 以上兩個問題,謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 163.18.48.28