Random Ramblings on LabVIEW Design

Community Browser
Showing results for 
Search instead for 
Did you mean: 

File Dialogs - This is annoying me!

Active Participant

Afternoon Hombres

While scrubbing up my NIWeek demos this annoyance raised its head again.

This is an OS issue and not LabVIEW, but the solution may be out there already.


I press the filepath button and use the express filedialog function to throw up a dialog (the browse button does the same thing). It appears behind the calling Front Panel causing all sorts of mayhem associated with hidden modal boxes.

As I understand it the root of the issue is to do with a 32bit program (LabVIEW) calling a 64bit dll function (filedialog), this modal function doesn't know who called it so doesn't know what to sit in front of. An Alt-Tab sorts it out, but it still doesn't meet requirement zero for me.

What is an elegant way to rectify the situation?

Lots of Love



What is the modality of your VI?

Active Participant

I have tried Modal and Floating for the calling vi. Just for completeness the file dialog is modal.

I'll go back and double check, but to make it more annoying still, it can be intermittent. Today it was happening every time, even after reboots etc.

I've seen it before and one solution is to call a windows function that brings in all the open windows and then we push it to the top. This is a polling type affair and is a bit ugly.

The tidiest solution is for me to make a file dialog box from scratch and throw the system one away, but I haven't enough time currently. Another possibility is to try and find the 32 bit file dialog and call that, not really looked into it yet tho'

Surely this behaviour has been observed before, I've seen in in Excel.


I haven't personaly seen this before. VIPM uses many dialogs to prompt users and it never happened once.

But why would you make the calling VI modal? That would make it worse.

Active Participant

Fault finding, trying all the easy things first.

This is Win 10 64 bit running LV 2013 32 bit, I think that may be important.

32 bit Win, 32 bit LV no probs.

It's counter-intuitive because the file dialog is modal, and it happens with the browse button on a filepath too.

Active Participant KvZ
Active Participant

Same here I haven't seen this behavior before. Gave a quick try and it works on my system, the express file dialog is modal to my calling VI. (Win10 64bit LV2013 32bit)

This may be related to your calling VI not having a visable window title bar?

For native Windows dialogs to be made modal they require the window handle of the parent window. This window handle is not available in a LabVIEW VI. It can be queried using a Win32 API call using the window title (FP Title property). This may be failing on a 64bit OS assuming the express VI implementation uses this method?

Active Participant

Sorry new one for me as well.

If you do come to the conclusion you can't fix this dialog, perhaps there is a .net call that might work better? Certainly easier than starting from scratch!

James Mc
CLA and cRIO Fanatic
My writings on LabVIEW Development are atdevs.wiresmithtech.com
Active Participant

That's a possibility Karsten, I'm liking the theory.

I tested it and the file dialog now appears in front as it should. Wooot I thought, but being a good test engineer I put it back to its original (a really good test engineer would tested it like this beforehand!).................and that works too.

So today it all works as it should.

Next I'm going to load some of the other stuff I had open and see if that's the cause. Ho-Hum

Active Participant

I think you may be right, it's just a bit platform-specific.

It's a puzzler.

Active Participant KvZ
Active Participant

Don't think .net will help here. You will need to give this the same win32 window handle to make the dialog modal to the VI window which requires the suspected query.

Additionally .net uses a interface for this handle that requires an user class that implements the interface when you don't have a .net UI.


Active Participant

I was thinking of embedding the .net file dialog controls in a VI, therefore forcing the functionality into a known quantity.

It's not going to come easy tho'.

I've seen this in various versions of Windows and various versions of LabVIEW. I've also seen it in different programs.Specifically Excel and Word.

Googling the issue I've found mention of it on Oracle forums and various IT support forums, the fix here seems to be to blame the poor user!

It's not common, but it is there. Yesterday it was doing it 100% of the time. Today it's not doing it at all.