none
Background Thread Causing Flicker and Grabbing Focus RRS feed

  • Question

  • I have a VSTO 2.0 Microsoft Word Template using VS.NET 2005 RC1.

    Everytime that my background thread that's parsing part of the document looks at the style information on a range, the document grabs focus from where ever has focus (my action pane, the Styles and Formatting Task Pane and so on). This is also causing a severe flicker in my Styles and Formatting Task Pane.

    Does anyone know how to run a background thread in VSTO so that it doesn't grab focus and cause that type of flicker when it talks to the Microsoft Word object model?
    Tuesday, October 4, 2005 6:51 PM

Answers

  • Unfortunately accessing some properties in Word/Excel OM does have the effect of stealing focus, creating temporary windows etc. So, the problem is not the background thread but accessing the document styles programmatically.

    Thursday, October 6, 2005 8:47 PM

All replies

  • Try setting ThisApplication.ScreenUpdating to False.
    Tuesday, October 4, 2005 10:01 PM
  • Unfortunately setting ScreenUpdating to false didn't work.
    Wednesday, October 5, 2005 7:25 PM
  • Unfortunately accessing some properties in Word/Excel OM does have the effect of stealing focus, creating temporary windows etc. So, the problem is not the background thread but accessing the document styles programmatically.

    Thursday, October 6, 2005 8:47 PM
  • This is very frustrating we have a lot of code areas that ScreenUpdating doesn't do anything to fix, Swapping into headers and footers, searching etc etc, think this is going to be for a while and our users complain that this is a cause of potential ill affects so am not sure if the Office team will take seriously to fix these in Office 12 lets hope.

    Regards
    Monday, October 10, 2005 12:14 PM
    Moderator
  • Is there a solution to this problem?. 
    Wednesday, June 12, 2019 11:08 AM