Top and Right panel returns null when system is in sleep mode

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

Top and Right panel returns null when system is in sleep mode
 
Reggie




Posts: 12
Joined: 2022-03-22
Hello,

I have some issues with the Add-in Express Regions professional.
My Top and Right region works as expected however, when I put my windows machine in sleep mode, and turn it on, my top and rightbar returns null.

//returns null
ADXTopbar adxTopBar = (ADXTopbar)ADXOlFormsManager.CurrentInstance.Items[1].GetCurrentForm();


I hope you can help me with this issue as this is very important.

Kind regards,

Reggie
Posted 21 Sep, 2022 08:39:22 Top
Andrei Smolin


Add-in Express team


Posts: 18827
Joined: 2006-05-11
Hello Reggie,

GetCurrentForm() relies on the active Outlook window. I suppose the issue occurs because there's no such window when you test that code. I suggest that you use the GetForm() method; it requires that you specify the Outlook window in which to look for a form instance.

Regards from Poland (CEST),

Andrei Smolin
Add-in Express Team Leader
Posted 21 Sep, 2022 09:35:30 Top
Reggie




Posts: 12
Joined: 2022-03-22
Thank you Andrei, that worked for me.

Kind regards,

Reggie
Posted 23 Sep, 2022 02:08:05 Top
Andrei Smolin


Add-in Express team


Posts: 18827
Joined: 2006-05-11
That's great!

Regards from Poland (CEST),

Andrei Smolin
Add-in Express Team Leader
Posted 23 Sep, 2022 02:30:58 Top