Category: word for developers
shramsterson on Mon, 27 Aug 2018 20:54:55
I'm working on a Word add-on that shows a form dialog with a progress bar at some point. ProgressBar Style is set to marquee and is showing progress correctly on Word 2013 and 2016, but is not showing any progress on Word 2007/2010. There is nothing going on in the background - I isolated the dialog to only show up when I click a button for debugging purposes and there's nothing else going on. I'm not sure why this is not working, especially since it works for some Word versions.
This is what my ProgressBar.cs looks like:/// <summary>
/// Progress dialog for report
public partial class ProgressBar : Form
/// <param name="message">message to display</param>
I created the dialog in the Windows Forms Designer and added the ProgressBar from the toolbox, I kept all the default settings, but changes the Style to "Marquee" and made sure MarqueeAnimationSpeed is 30 (I believe it's 30 by default as well). Any ideas why this is not working?
Jianguo Wang on Tue, 28 Aug 2018 03:45:44
Thank you for posting here.
According to your description, your issue is more related about Word for Developers. And this forum is discussing and asking questions about the Windows Form and ClickOnce, I will move this thread to corresponding forum:Word
Thank you for your understanding.
Seiya Su-MSFT on Tue, 28 Aug 2018 08:09:33
Make sure you have a line of code in your Main routine that calls EnableVisualStyles and that your operating system has visual styles enabled as well.
And although we use the same code, but for different version VS, we need to check the AssemblyInfo or other config file to enable/disable some config.
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread.
shramsterson on Tue, 28 Aug 2018 16:19:08
Thank you! It's my first time posting, I appreciate you moving this for me!
shramsterson on Tue, 28 Aug 2018 16:22:02
This worked! I'm using Visual Studio 2013 and the same application runs on all versions of Word. I added Application.EnableVisualStyles() before I initialize the dialog and it worked for my Word 2007 and 2010.
I didn't need to check the AseemblyInfo or anything else in my case, but maybe this will be helpful for anyone else who stumbles upon this thread.