# Virtual Background does not appear - Windows SDK

**URL:** <https://devforum.zoom.us/t/virtual-background-does-not-appear-windows-sdk/37694>\
**Category:** Meeting SDK\
**Created:** [December 4, 2020, 9:21pm UTC](https://devforum.zoom.us/t/virtual-background-does-not-appear-windows-sdk/37694 "2020-12-04T21:21:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![apdevuser](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/apdevuser/32/73110_2.png) [@apdevuser](https://devforum.zoom.us/u/apdevuser)\
**Post date:** [December 4, 2020, 9:21pm UTC](https://devforum.zoom.us/t/virtual-background-does-not-appear-windows-sdk/37694/1 "2020-12-04T21:21:31Z")

</div>

**Description**  
We are programmatically setting the virtual background for our users. Using the example code in sdk\_demo\_v2, we added the image using AddBGImage(file\_path) and then retrieved the image from GetBGImageList() -\>GetItem(index). We then utilize UseBGImage(pImageInfo) to set the VBG and receive SDKERROR\_SUCCESS. The virtual background cannot be seen in the users video element.

**Which version?**  
v5.2.42037.1112

**Screenshots**  
The following code shows how the VBG is being set:

 ![VBG_code_snippet](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/c/f/cf73e85c063116d5744194a0284a77223592c321.png)

**Device (please complete the following information):**

- Device Spec: PC
- OS: Windows 10

**Additional context**

I looped through the list after setting my image to verify which image is selected for the background. isSelected() returns true on index 0, which I understand to be the default for “no background image.” I ensured that my image was at index 1, but this did not change the selected image from index 0.

---

<div class="post-metadata">

**Author:** ![apdevuser](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/apdevuser/32/73110_2.png) [@apdevuser](https://devforum.zoom.us/u/apdevuser)\
**Post date:** [December 30, 2020, 5:00pm UTC](https://devforum.zoom.us/t/virtual-background-does-not-appear-windows-sdk/37694/2 "2020-12-30T17:00:09Z")

</div>

I am still unable to get my VBG to show up in the video element.

I create two images with **m\_pVBGSettingContext-\>AddBGImage(file\_path)** and I am able to retrieve them from **m\_pVBGSettingContext-\>GetBGImageList()**.

After calling **m\_pVBGSettingContext-\>UseBGImage(pImage)**, I loop through the list again and call **isSelected()**. This is always true for index 0 which is no VBG. See output here:

 ![vbg_output](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/b/9/b9998c5afc36874778291ed8010680ecf982f50f.png)  
**m\_pVBGSettingContext** always has the 0 index selected no matter what I pass into **UseBGImage(pImage)** how do I fix this??

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [January 4, 2021, 11:07pm UTC](https://devforum.zoom.us/t/virtual-background-does-not-appear-windows-sdk/37694/3 "2021-01-04T23:07:52Z")

</div>

Hey @apdevuser,

Thanks for using the dev forum!

Can you try updating to the latest version? (.1229)  
Note, for this version and future versions the SDK can be downloaded through the Zoom Marketplace instead of Github. It will be under Build App -\> SDK -\> Download -\> Windows.

Please let me know if you see the same behavior on the latest version.

Thanks!  
Michael
