# How to listen for monitors open and close events ？

**URL:** <https://devforum.zoom.us/t/how-to-listen-for-monitors-open-and-close-events/7286>\
**Category:** Windows\
**Created:** [January 2, 2020, 2:30pm UTC](https://devforum.zoom.us/t/how-to-listen-for-monitors-open-and-close-events/7286 "2020-01-02T14:30:20Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![j421037083](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/j421037083/32/2760_2.png) [@j421037083](https://devforum.zoom.us/u/j421037083)\
**Post date:** [January 2, 2020, 2:30pm UTC](https://devforum.zoom.us/t/how-to-listen-for-monitors-open-and-close-events/7286/1 "2020-01-02T14:30:20Z")

</div>

hi,  
**Description**  
i’m using windows sdk and i hava two monitors.  
When one of the monitors is disconnected, the two meeting windows overlap.  
Can I solve this problem by listen the display events of the display？

**Screenshots**

 ![20200102222817](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/b/bf771f9bff23bac95689074b70351f3478cd9dd3.png)

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [January 2, 2020, 8:01pm UTC](https://devforum.zoom.us/t/how-to-listen-for-monitors-open-and-close-events/7286/2 "2020-01-02T20:01:20Z")

</div>

Hi [j421037083](https://devforum.zoom.us/u/j421037083),

Thanks for using Zoom SDK. May I inquire the following info:

1. What is the SDK version you are using?
2. Is it possible to reproduce this issue with our demo app? What the steps to reproduce this issue?

Looking forward to hearing from you.

Thanks!

---

<div class="post-metadata">

**Author:** ![j421037083](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/j421037083/32/2760_2.png) [@j421037083](https://devforum.zoom.us/u/j421037083)\
**Post date:** [January 3, 2020, 1:05am UTC](https://devforum.zoom.us/t/how-to-listen-for-monitors-open-and-close-events/7286/3 "2020-01-03T01:05:01Z")

</div>

Hi Carson\_Chen,

1. sdk version: v4.4.57220.1211  
2.This can be reproduced:  
The host prepares two screens, joins the meeting, and then disconnects data from one of the screens. At this time, the two meeting windows will overlap.

---

<div class="post-metadata">

**Author:** ![j421037083](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/j421037083/32/2760_2.png) [@j421037083](https://devforum.zoom.us/u/j421037083)\
**Post date:** [January 3, 2020, 1:43am UTC](https://devforum.zoom.us/t/how-to-listen-for-monitors-open-and-close-events/7286/4 "2020-01-03T01:43:06Z")

</div>

But when I turn on the screen again, the dual screen mode will not turn on automatically

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [January 3, 2020, 9:21pm UTC](https://devforum.zoom.us/t/how-to-listen-for-monitors-open-and-close-events/7286/5 "2020-01-03T21:21:17Z")

</div>

Hi [j421037083](https://devforum.zoom.us/u/j421037083),

Thanks for the info. Really appreciate it. Would you mind providing the SDK log so that we could further investigate this issue?

Here are the steps to get the SDK log:

1. Set the `enableLogByDefault` to be `true` at initializing the SDK
2. After the issue appears, and the lifecycle is over, you may find the log in %appdata%/zoomsdk/logs/, please compress the files in this folder and sent back to us.

Looking forward to hearing from you. Thanks!

---

<div class="post-metadata">

**Author:** ![j421037083](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/j421037083/32/2760_2.png) [@j421037083](https://devforum.zoom.us/u/j421037083)\
**Post date:** [January 6, 2020, 2:21am UTC](https://devforum.zoom.us/t/how-to-listen-for-monitors-open-and-close-events/7286/6 "2020-01-06T02:21:33Z")

</div>

Hi @carson.zoom,  
this is video [http://421037.f3322.net:8090/video/1578276652722570.mp4](http://421037.f3322.net:8090/video/1578276652722570.mp4)

---

<div class="post-metadata">

**Author:** ![j421037083](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/j421037083/32/2760_2.png) [@j421037083](https://devforum.zoom.us/u/j421037083)\
**Post date:** [January 6, 2020, 1:10pm UTC](https://devforum.zoom.us/t/how-to-listen-for-monitors-open-and-close-events/7286/7 "2020-01-06T13:10:00Z")

</div>

this is logs [http://421037.f3322.net:8090/video/logs.zip](http://421037.f3322.net:8090/video/logs.zip)

---

<div class="post-metadata">

**Author:** ![j421037083](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/j421037083/32/2760_2.png) [@j421037083](https://devforum.zoom.us/u/j421037083)\
**Post date:** [January 6, 2020, 3:57pm UTC](https://devforum.zoom.us/t/how-to-listen-for-monitors-open-and-close-events/7286/8 "2020-01-06T15:57:05Z")

</div>

I retested again. When I opened the meeting, I only opened screen1, and then the interface of the graphics card connected to screen2. At this time, zoom SDK could not redraw the meeting window. I used all the relevant methods in the SDK

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [January 6, 2020, 7:53pm UTC](https://devforum.zoom.us/t/how-to-listen-for-monitors-open-and-close-events/7286/9 "2020-01-06T19:53:37Z")

</div>

Hi [j421037083](https://devforum.zoom.us/u/j421037083),

Thank you very much for providing the log and the video. This is very helpful. I have forwarded this to the engineering team and will get back to you shortly.

Thanks!

---

<div class="post-metadata">

**Author:** ![j421037083](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/j421037083/32/2760_2.png) [@j421037083](https://devforum.zoom.us/u/j421037083)\
**Post date:** [January 7, 2020, 12:49am UTC](https://devforum.zoom.us/t/how-to-listen-for-monitors-open-and-close-events/7286/10 "2020-01-07T00:49:35Z")

</div>

Thank you for following up

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [January 7, 2020, 7:54pm UTC](https://devforum.zoom.us/t/how-to-listen-for-monitors-open-and-close-events/7286/11 "2020-01-07T19:54:12Z")

</div>

Hi [j421037083](https://devforum.zoom.us/u/j421037083),

Thank you very much for all the info. It appears that the Zoom Windows Client also has this issue, I will report this case to the Windows Client team, once they have fixed this issue, our SDK will inherit this fix.

Thanks!

---

<div class="post-metadata">

**Author:** ![j421037083](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/j421037083/32/2760_2.png) [@j421037083](https://devforum.zoom.us/u/j421037083)\
**Post date:** [January 8, 2020, 12:48am UTC](https://devforum.zoom.us/t/how-to-listen-for-monitors-open-and-close-events/7286/12 "2020-01-08T00:48:49Z")

</div>

Hi @carson.zoom,  
I solved this problem by opening the custom UI and forcing new two [ICustomizedUIMgr](https://zoom.github.io/zoom-sdk-windows/class_i_customized_u_i_mgr.html) before opening the meeting.

thanks!

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [January 8, 2020, 7:09pm UTC](https://devforum.zoom.us/t/how-to-listen-for-monitors-open-and-close-events/7286/13 "2020-01-08T19:09:54Z")

</div>

Hi [j421037083](https://devforum.zoom.us/u/j421037083),

Glad to hear that the Custom UI works. Let me know if any other questions.

Thanks!

---

<div class="post-metadata">

**Author:** ![j421037083](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/j421037083/32/2760_2.png) [@j421037083](https://devforum.zoom.us/u/j421037083)\
**Post date:** [January 10, 2020, 6:33am UTC](https://devforum.zoom.us/t/how-to-listen-for-monitors-open-and-close-events/7286/14 "2020-01-10T06:33:28Z")

</div>

Hi @carson.zoom,  
It doesn’t work very well. The window will flash when the meeting is opened.  
I expect to expose an interface to generate meeting windows or provide more details in the SDK.  
thanks for you help!

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [January 10, 2020, 7:34pm UTC](https://devforum.zoom.us/t/how-to-listen-for-monitors-open-and-close-events/7286/15 "2020-01-10T19:34:47Z")

</div>

Hi [j421037083](https://devforum.zoom.us/u/j421037083),

Thanks for the reply and sorry to hear that it does not work well. Since this issue is happening on the Windows Client as well, the SDK is depending on the fix from the client. I have already reported this issue to the client team, once they have fixed this, the issue will be fixed in SDK as well. I will keep you updated.

Thanks!

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 7:10pm UTC](https://devforum.zoom.us/t/how-to-listen-for-monitors-open-and-close-events/7286/16 "2020-08-21T19:10:01Z")

</div>

Closed on August 21, 2020, 7:10pm UTC


