Deleting File which is displayed in picturebox

前端 未结 5 1294
北海茫月
北海茫月 2021-01-17 15:39

I am selecting file from openfiledialoge and displaying it in picturebox and its name in textbox when I click on delete button I am getting exception The

5条回答
  •  死守一世寂寞
    2021-01-17 16:07

    By using GetThumnailImage you have to specify the width and height which is static. Use the Load method instead. eg: pictureBox1.Load(Path to the image); by using this u will have no problem in deleting the image or the folder before closing the app. no other methods need to be created. hope this helps

提交回复
热议问题