Example Programs

cancel
Showing results for 
Search instead for 
Did you mean: 

Windows Explorer in your front panel

Overview

This example shows how to use one of the .NET control to have the Windows Explorer shell in  front panel to be able to read/write files, open any folder or file and navigate to different locations on your hard drive. 


Description
The Explorer is loaded from the Shell assembly from the API Code Pack. It works pretty good just by defining the current location to be any path (e.g. "C:\Program Files\National Instruments"). It then displays the folder as if you were in a dedicated Windows Explorer window.

The drag/drop feature is native on path/string controls that have the "Allow Drop" property set to True. One just has to declare a "Value Changed" event on the path to make it effective, and use some random code in it (here, plot the data from the txt file).

Finally, to avoid having a too huge part of the FP dedicated to the Explorer, a Slide to hide/show the panel containing the .NET control is added. 


Requirements

  • LabVIEW 2012 (or compatible)
  • .NET Framework 4.0


Steps to Implement or Execute Code

  1. Run the VI
  2. Navigate in the explorer as if you were
  3. in a regular folder.
  4. Enter a new location in the address bar.
  5. Click the centered boolean to hide/show
  6. the explorer.
  7. Drag&Drop a txt file to the graph (Graph.txt)

 

Additional Information or References
VI Block Diagram

 5-56.png

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.

Comments
Member Jeremie_CENTUMADENEO
Member

Interesting!!

It's important to say that sources are in Labview 2012.

Member Mr_J
Member

Hi,

it looks interesting, can you save it to Labview 2011?

Member njm126
Member

Hi

I found this method is very good to extend the Labview function. I have a further question:

In your program, I have to place a path file control on the FP in order to get the drag path. But if it is possible to directly get the drag file path and file name by the method and property of ExplorerBrowser? And transfer the path to the drag data and be used in the later program? It means get the path without the path file control.

Thanks a lot.

Capture.JPG

Member ahlers01
Member

Hi,

I'd like to extend the use of the .NET file explorer application a bit.

But where can I find documentation for the Microsoft.WindowsAPICodePack.Shell which you have used?

 

Thanks!