ActiveDocument.ActiveWindow.View.FullScreen change event

Add-in Express™ Support Service
That's what is more important than anything else

ActiveDocument.ActiveWindow.View.FullScreen change event
 
Niels Ziegler




Posts: 49
Joined: 2017-02-03
When a user changes the view using View -> Fullscreen, my custom task panes stay open but I do no receive any events I could use. I looked everywhere to find an event where I can get notified of a "ActiveDocument.ActiveWindow.View" change. I tried the window activated event, but it only fired after coming out of fullscreen.
Posted 21 Feb, 2017 09:58:13 Top
Andrei Smolin


Add-in Express team


Posts: 14115
Joined: 2006-05-11
Hello Niels,

What Office application and version?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 21 Feb, 2017 10:18:45 Top
Niels Ziegler




Posts: 49
Joined: 2017-02-03
Sorry, I was talking about Word 2010.
Posted 21 Feb, 2017 10:20:18 Top
Andrei Smolin


Add-in Express team


Posts: 14115
Joined: 2006-05-11
Niels,

I would try intercepting the CommandBars.OnUpdate event and checking if the View.FullScreen is true for the current view. In Add-in Express this event is mapped to the CommandBarsUpdate event of the ADXWordAppEvents component. Be aware that this event may occur really often so that ineffective coding may slow down the performance.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 21 Feb, 2017 10:27:18 Top
Niels Ziegler




Posts: 49
Joined: 2017-02-03
You are correct, this event occurs often but at least I can react to the view change.

All my task panes now register their state in a variable in the main module and this is always the first check to keep operations to a minimum.

if (_taskpanesVisible && ActiveDocument.ActiveWindow.View.FullScreen)


As long as one of them is visible (I have 3 task panes), I act on the event and hide them. If the user wants them back, he has to reopen them manually. I might have to change this to store the individual state and reopen again later.

Thanks for the support.
Posted 21 Feb, 2017 10:55:02 Top