GetOpenFolderItem Not Working?

I want to display an image on the window background

So this is the code…

But instead of showing the batman picture a file dialog opens up , from where i have to select the picture … like this.

After i select the image then i get the background

But its not doing it automatically… I dont want to choose the image . I want the image to exist from the beginning.

Am i doing something wrong?

GetOpenFolder shows a selection dialog

GetFolderItem just uses the filename you supply as a parameter

1 Like

If its always batman, drag the jpeg into your project, and then all you need to do is

me.backdrop = batman

1 Like

Just a reminder that GetOpenFolderItem is deprecated. Unless you are using a version prior to 2019r2, you should instead be using FolderItem.ShowOpenFileDialog.

2 Likes