LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to create a custom file dialog box/vi (win)??

Hello,

I'd like to create a custom file dialog box to handle the reading of my tdms files. Basicly I want to extend the existing file select dialog box with a graphical preview of the data in the selected file. I know I can create all the logic for file selection by hand and use a list box to display the filelist, but I would rather prefer to somehow use the existing windows controls. So is it possible to get the windows file selector on the front panel of a vi and react to the user selection? If so, is there any example available on how to do this? Any other options? I'm using labview 8.2

thanks for your input!

klaus
0 Kudos
Message 1 of 2
(2,686 Views)
Klaus,

I wouldn't know that Microsoft provides access to the controls that Explorer and file dialog consist of.

There might be a different and more powerful solution though. The WINDOWS Explorer / file dialog have a plugin API that allows you to associate your own application for thumbnail creation with a particular file extension. That way, TDMS thumbnails will show in any instance of Explorer and File Dialog without you having to make your own dialog. Basically, you would need to compile the VI that creates the thumbnail into a LabVIEW-built DLL and then wrap this DLL with some C++ boilerplate code that Microsoft provides. You might want to have a look at the bottom of this article to get an idea of how the whole thing works:
http://msdn.microsoft.com/msdnmag/issues/0600/w2kui2/default.aspx.

Hope that helps,
Herbert
0 Kudos
Message 2 of 2
(2,673 Views)