如何在Microsoft Word 2010加载项中添加进度条 [英] How to Add Progress bar in microsoft word 2010 Add-In

查看:372
本文介绍了如何在Microsoft Word 2010加载项中添加进度条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Microsoft word 2010加载项。单击必需按钮时,需要很长时间才能完成。我希望在流程完成时添加进度条,以便让用户知道特定实例正在运行。



编写了以下代码,但未显示进度条。请指导如何实现这一目标。



[code]



Working on Microsoft word 2010 Add-In. When Required button is clicked it takes quite long time to complete. i want to add a progress bar while the process completes so that user is made aware that particular instance is working.

wrote following code but progress bar does not appears. please guide how to achieve that.

[code]

Dim myProgressBar As ProgressBar = Nothing
myProgressBar = New ProgressBar
myProgressBar.Minimum = 0
myProgressBar.Maximum = 100
myProgressBar.Visible = True
myProgressBar.PerformStep()







/ [code]




/[code]

推荐答案

只是创建一个控件实例不会在屏幕上显示它。



您创建了一个控件实例,但从未将其添加到窗体控件集合中,所以有什么都不显示。您也永远不会在表单上设置控件的位置。
Just creating an instance of a control does not show it on screen.

You created an instance of the control, but never added it to a forms Controls collection, so there's nothing to show. You also never set the Location of the control on the form.


这篇关于如何在Microsoft Word 2010加载项中添加进度条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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