当我最小化我的应用程序时,我的所有绘图都消失了 [英] When I minimize my application all of my drawings disappears
本文介绍了当我最小化我的应用程序时,我的所有绘图都消失了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在构建一个显示炮弹轨迹的C#应用程序。但是,当我将它缩小时,我将它吸引回来的轨迹已经消失。有没有简单的方法来阻止它?
解决方案
我在鼠标事件中下注您的绘图。使用onpaint事件,你应该很好去。
编辑:
这是一个使用onpaint()事件的体面的绘图教程:
http://www.geekpedia.com/tutorial50_Drawing -with-Csharp.html
I am building a C# app that shows the trajectory of a cannonball. But when I minimize it the trajectory I have drawn to a picture box are gone when I bring it back up. Is there an easy way to stop this?
解决方案
I bet your drawing in the mouse event. Use the onpaint event and you should be good to go.
Edit:
Here is a decent drawing tutorial using the onpaint() event:
http://www.geekpedia.com/tutorial50_Drawing-with-Csharp.html
这篇关于当我最小化我的应用程序时,我的所有绘图都消失了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文