[問題] .net 等待事件結束

看板C_and_CPP (C/C++)作者 (little sunshine:))時間13年前 (2013/02/28 19:00), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/1
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) VC++ winform 問題(Question): 在一個button click事件裡面 執行到某一行後 要等待picturebox的click右鍵事件完成 再繼續執行 請問該如何撰寫呢? 程式碼(Code):(請善用置底文網頁, 記得排版) private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { ..... ..... 等待picturebox的click右鍵事件完成 繼續執行 ... } private: System::Void pictureBox1_MouseClick(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) { if(e->Button==System::Windows::Forms::MouseButtons::Right) { doneDraw = 1; } } 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.118.175.46

02/28 19:43, , 1F
while(!doneDraw) System::Windows::Forms::DoEvents()
02/28 19:43, 1F
文章代碼(AID): #1HBpZbAB (C_and_CPP)
文章代碼(AID): #1HBpZbAB (C_and_CPP)