如何重新加载表格... [英] how to reload form....

查看:82
本文介绍了如何重新加载表格...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做项目,因为我遇到了问题..在该按钮上我按下了一个按钮,然后单击打开.一种形式是重置主表单上的值...该表单重置值,但它们显示在主表单上表单...所以请发送解决方案.........

i am doing the project in that i have problem..in i am taken a one button on that button click open one form is the reset the values on main form...that form reset the value but they show on main form...so please send the solution............

推荐答案

将所有表单填写逻辑放入名为等,然后调用该方法.

Put all your form filling logic in a method called FillForm etc. and just call that method.

private void Form1_Load(object sender, EventArgs e)
{
    FillForm();
}

private void FillForm()
{
   // fill your form with values
}

public void ResetForm()
{
    FillForm();
}


使用Invalidate()方法重新显示或重画Form或任何控件.
To relodr or repaint your Form or any control use Invalidate() method.
this.Invalidate();


它将重绘/重新加载控件


It will rapaint/reload the control


这篇关于如何重新加载表格...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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