用户登录身份验证进度栏 [英] user login Authentication progress bar

查看:167
本文介绍了用户登录身份验证进度栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我试图将进度条放在窗口应用程序中的用户登录表单(登录身份验证时间)上,但是当我单击登录按钮然后控制转到Web服务时出现问题,这一次我的表单看起来像死了,我有一个进度条在此表格上也将停止.

我试图在登录身份验证时在窗口窗体上显示进度条,如果有人知道任何解决方案,请告诉我.

感谢

hi to all,

I am trying to put progress bar on user login form (login authentication time) in window application, but i have a problem when i click on login button then control went to web services this time my form looking like dead, i have one progress bar on this form it is also stop.

i am trying to show progress bar on my window form at login authentication time, if any one know any solution please let me know.

Thanks

推荐答案

IMO,您应该使用等待光标而不是进度条.进度条是固定和已知时间或数量的指示器,登录过程不确定.
IMO you should use a wait cursor rather than a progressbar. A progressbar is an indicator of a fixed and know time or quantity, the login process is indeterminate.





尝试等待光标进行用户登录身份验证.


Cursor.Current = Cursors.WaitCursor;



try wait cursor for user login Authentication.


Cursor.Current = Cursors.WaitCursor;


作为Marks答案的附加提示,您应该使用try/finaly.
如果认证时出了点问题,您的WaitCursor将会保留.

Just as an additional hint to Marks answer, you should use try/finaly.
If there''s something going wrong while authentication your WaitCursor will stay.

try
{
   Cursor.Current = Cursors.WaitCursor;
   // do authentication;
}
catch (Exception ex)
{
   // handle exception
}
finally
{
   Cursor.Current = Cursors.Default;
}


这篇关于用户登录身份验证进度栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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