当前位置:网站首页>C # picture display occupancy problem
C # picture display occupancy problem
2022-07-02 04:51:00 【dancebit】
Control
pictureBox1.Image = Image.FromFile("1.jpg");
No problem in actual use , But the picture will be occupied , Not even delete .
After image assignment pictureBox1 It will not refresh immediately , If released immediately image.Dispose() It will cause the back of the picture pictureBox1 An error is reported when the resource is not found during refresh . So refresh the image control before releasing pictureBox1.Refresh() that will do Release files .
The implementation is as follows :
var image = Image.FromFile("1.jpg");
pictureBox1.Image = image;
pictureBox1.Refresh();
image.Dispose();
边栏推荐
- Geotrust OV Multi - Domain Domain SSL Certificate rmb2100 per year contains several Domain names?
- Win10 disk management compressed volume cannot be started
- How to modify data file path in DM database
- Free drawing software recommended - draw io
- Solution: the agent throws an exception error
- 06 装饰(Decorator)模式
- [Yu Yue education] autumn 2021 reference materials of Tongji University
- Pytest learning ----- pytest Interface Association framework encapsulation of interface automation testing
- geotrust ov多域名ssl证书一年两千一百元包含几个域名?
- Precipitate yourself and stay up late to sort out 100 knowledge points of interface testing professional literacy
猜你喜欢
Pit encountered in win11 pytorch GPU installation
Federal learning: dividing non IID samples according to Dirichlet distribution
万卷共知,一书一页总关情,TVP读书会带你突围阅读迷障!
Several methods of capturing packets under CS framework
How to modify data file path in DM database
Solution of DM database unable to open graphical interface
idea自动导包和自动删包设置
Lay the foundation for children's programming to become a basic discipline
AcrelEMS高速公路微电网能效管理平台与智能照明解决方案智慧点亮隧道
Exposure X8 Standard Version picture post filter PS, LR and other software plug-ins
随机推荐
Markdown edit syntax
Learn what definitelytyped is through the typescript development environment of SAP ui5
win10 磁盘管理 压缩卷 无法启动问题
Mysql表insert中文变?号的问题解决办法
Arbre binaire pour résoudre le problème (2)
Thinkphp Kernel wo system source Commercial Open source multi - user + multi - Customer Service + SMS + email notification
Cannot activate CONDA virtual environment in vscode
CorelDRAW Graphics Suite2022免费图形设计软件
Why can't you remember when reading? Why can't you remember- My technology learning methodology
Rhcsa --- work on the third day
Rhcsa --- work on the fourth day
The solution to the complexity brought by lambda expression
TypeScript函数详解
Binary tree problem solving (2)
Steam教育的实际问题解决能力
Cultivate primary and secondary school students' love for educational robots
Its appearance makes competitors tremble. Interpretation of Sony vision-s 02 products
Orthogonal test method and function diagram method for test case design
Free drawing software recommended - draw io
记录一次Unity 2020.3.31f1的bug