刷新应用程序 [英] Refresh an application

查看:67
本文介绍了刷新应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我创造的winforms中,我有一些文本框和图片框。在运行表单时,我使用fileopendialog将图像上传到图片框中,并使用了文本框中的文本。现在我想刷新表单,再次选择一些图像并加载。我使用过this.refresh但它没有给出合适的结果,我也不想使用application.restart。

提前谢谢。

In the winforms I have created I have some textboxes and pictureboxes. On running the form I have uploaded images in pictureboxes using fileopendialog and have used the text in textboxes. Now I want to Refresh the form, to again select some images and load. I have used this.refresh but its not giving the appropriate result, Also I don't want to use application.restart.
Thanks in advance.

推荐答案

发布示例代码..以正确了解您的要求,



这里您可以使用相同的opendialog一次又一次地加载图像。如果不需要,则处理上一个图像... this.Refresh()永远不会给你任何弹出框来加载新图像。
Post sample code..to get correct idea about your requirements,

Here you can use same opendialog to load image again and again. and dispose the previous image if it is not needed... this.Refresh() will never give you any pop up boxes to load new images.


也许这对你有所帮助

您可以使用构造函数,在刷新按钮中单击尝试关闭当前表单并使用将使用新实例加载的构造函数参数调用相同的表单。
Maybe this help you
You can use the constructor, in a refresh button click try to close the current form and call the same form with the constructor parameters which will load with new instance.


这篇关于刷新应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆