Windows窗体上的状态更新消息 [英] Status update message on windows forms

查看:81
本文介绍了Windows窗体上的状态更新消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

直截了当

我正在创建一个Windows应用程序(.net c#),我有一个名为getData的按钮。单击此按钮

我需要显示标签(不是消息框)闪烁 - 进度...一旦数据加载完成,用闪烁 - 空闲更新相同的标签

有人可以建议解决方案吗?

Straight to the point 
I’m creating a windows application (.net c#) , I have a button named getData. On click of this button
I need to show a label (not message box) "Flashing - progress…" once data loading is complete update the same label with "Flashing - Idle"
Can someone suggest a solution?

推荐答案

使用。

Label1.Refresh();





use.
Label1.Refresh();


private void getData_Click(object sender, EventArgs e)
        {
            lblFlashingProgress.Text = "Flashing - Progress";
            lblFlashingProgress.Refresh();
            // GetData logic comes here...
            lblFlashingProgress.Text = "Flashing - Idle";
            lblFlashingProgress.Refresh();
       

        }


这篇关于Windows窗体上的状态更新消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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