1
A
回答
5
您可以將一個圖片框中顯示的Image
分配給另一個圖片框。如果您希望從原始圖片框中刪除圖像(以便它不會顯示兩次),您可以將其Image
屬性設置爲null
(或者,當然,您可以指定您選擇的任何其他圖像)。像這樣:
//Assign the image in one picture box to another picture box
mySecondPicBox.Image = myFirstPicBox.Image;
//Clear the image from the original picture box
myFirstPicBox.Image = null;
如果你想交換兩個圖片框顯示的圖像,你需要暫時存儲在一個變量的圖片對象之一。所以你可以使用非常類似的代碼,稍作修改:
//Temporarily store the picture currently displayed in the second picture box
Image secondImage = mySecondPicBox.Image;
//Assign the image from the first picture box to the second picture box
mySecondPicBox.Image = myFirstPicBox.Image;
//Assign the image from the second picture box to the first picture box
myFirstPicBox.Image = secondImage;
相關問題
- 1. Vb.net將圖片框中的圖片移動到另一個圖片框
- 2. 將圖像從圖片框移動到另一個圖片的另一個圖片盒
- 3. 圖片圖片框
- 4. 在另一個圖片框上透明圖片框
- 5. 如果圖片框小於圖片,圖像適合圖片框
- 6. 如何在C#中的另一個圖片框中的另一個圖片框中的另一圖片框中拖放一個圖像?
- 7. 如果圖片對齊到一邊,將圖片移動到圖片下方
- 8. 將圖片框添加到前一個
- 9. 將圖片添加到運動圖片框
- 10. Android片段 - 從一個視圖移動到另一個視圖?
- 11. 將圖片移動到WPF中的另一幅圖像
- 12. 在圖片框
- 13. 圖片/相框
- 14. 慢圖片框
- 15. 面板中的移動圖片框
- 16. 將圖片框移動一個非常小的距離
- 17. 將導入的圖片縮放到圖片框html
- 18. 製作一組圖片框,每個圖片框都有不同的圖像
- 19. 提取圖片從圖片框與handleref
- 20. 在圖片框中旋轉圖片
- 21. 獲取圖片fom webbrowser圖片框
- 22. 試圖改變一個圖片框c#
- 23. 移動圖片框vb.net mousekeydown和以上
- 24. 縮放圖片框內的圖像
- 25. 在C#中的圖片框內繪圖
- 26. 試圖分配圖片到VB中的圖片框
- 27. 如何繪製圖紙圖片框圖片框
- 28. CSS - 將另一張圖片重疊在另一張圖片上
- 29. 將圖片框劃掉C#
- 30. 編輯圖片/移動「移動」(一個Facebook的個人資料圖片編輯)