FolderItem.ShowOpenFileDialog does nothing under Windows 7 SP1

A client reported that he couldn’t browse for a file in my app on Windows 7 SP1. When I tested it, I found the same problem. There’s no issue under Windows 10 or MacOS, etc.

The code is just:

Var f As FolderItem = FolderItem.ShowOpenFileDialog("")

I’m using Xojo 2020 Release 2.1. According to Xojo’s System Requirements, Windows 7 SP1 is supported.

Any suggestions?

It seems to be something in my project because ShowOpenFileDialog in a new test project works on Windows 7 SP1. But even if I execute that line as the first line in my App.Open event, the open file dialog does not appear.

On the other hand, isn’t Windows 7 deprecated (no more supported by Microsoft) ?

Yes Windows 7 is no longer supported but Windows 7 SP1 is still officially supported by Xojo according to the system requirements I found. And the ShowOpenFileDialog does still work in a simple test project, just not in my actual project.

Could it be related to the specific event in which you’re using it? In your production app, is it in the App.Open event stack as well?

Don’t know if it’s related or not, but I had a problem two years ago with Windows 7 SP1 and ShowOpenFileDialog. It returns “Nil” when you attempt to open “Documents”, “Pictures”, “Music”, and Videos". Same code on Windows 10 works fine.

That’s weird that the test project works but yours doesn’t. Is it possible there’s a 32/64 bit thing going on?

But actively used anyway. 15%+ of my user base, much more than Win 8.x (around 3%).

You can always try the WinFileDialogMBS class in MBS Plugin with the subclasses.

Thanks Tim. I’ve tried it in App.Open (for quick testing purposes) and also on button click events further “down” the stack — which is where it sits in my actual app — with the same result.

Thanks Don. It sounds similar — and I also don’t have the problem under Windows 10, only Windows 7 SP1 — except that in my case you don’t even see the dialog to browse for a folder. The call to ShowOpenFileDialog just immediately returns nil with no UI shown (or at least not visible).

I’m wondering about the filter parameter, myself. Have you tried providing a valid file type? Have you tried running as admin?

Yes in my actual project there are two file types added to the call but to rule that out and keep it simple for the test I am passing an empty string. Both cases fail. I did try Run as Administrator and that didn’t change it.

This is just all kinds of weird. Have you opened a Feedback Case to see if someone at Xojo can replicate it with that project?

Yes Man ! *

I still use El Capitan.

But who knows what happens to my computer when I am surfing in the internet…

Beware of hackers !

  • Cigarettes kill people. But they are “actively used anyway”. :wink:

No because the simple test project I created works and so I thought I’d try to work out what it was in my own project first. The next thing I’m going to do is to try making the simple test project use some of the plugins that I use and see if one of them might be causing a problem. Almost 10% of my users are running Windows 7 SP1 (it’s the nature of this utility app that it is used by people on legacy systems) and the issue has only just been reported so my next guess is that it might be due to a recently updated plugin.

1 Like

… should be to clean out the cache and restart the computer.

If that doesn‘t help then check the code for project corruption (Arbed might be helpful).

In the end transferring the code to a new project might work - I had it 2-3 times over the years. More often a single method would be borked without an obvious reason (invisible characters?) and only deleting and recreating solved it. So you might try that.

Thanks Marcus. I have just tried your suggestion on the cache clear but it didn’t fix it unfortunately. I’ve had a look through my Git checkins going back to the end of last year when this was definitely working and using the side-by-side comparison of the diff I can’t see any corruption.

For now I’ve used the OpenDialogMBS control to replace Xojo’s and it’s working on Windows 7 SP1. So I might just leave it like this until my Windows 7 users, which represent 8% of the total, move up to Windows 10. :slight_smile: