LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Browse for Folder dialog

Someone in the CVI queue did not like the current browse for folder dialog (which I have found hard to use also) so I wrote up a DLL using assembler to hook into the standard Windows folder dialog then I wrapped it up into a VI for ease of use.  Thought others might also like to use it so I decided to post.  I wront this in LabVIEW 8.0 and backsaved to 7.1 so if there are any issues let me know...
Message 1 of 32
(10,534 Views)
dont suppose you could save it in 7.0 Smiley Wink

0 Kudos
Message 2 of 32
(10,506 Views)
Very nice, Chaos!
 
 
Even 5 year ago, I thought that LabVIEW should automatically substitute this dialog if we specify to browse for folders only. 😉
 
 
 
Chaos, do you think there is a way to make the dialog resizeable? How about the enhanced version (W2k, XP?) that allows you to create a new folder?

Message Edited by altenbach on 12-16-2005 09:13 AM

0 Kudos
Message 3 of 32
(10,505 Views)

@altenbach wrote:
Chaos, do you think there is a way to make the dialog resizeable? How about the enhanced version (W2k, XP?) that allows you to create a new folder?

 
Hmm.  Make it resizeable... yeah I might be able to do that by setting a system hook and watching for the pop-up but before it shows modify its windows attributes.  I used to mess with the standard windows message box that way.  I dont know if it would be worth the trouble however Smiley Tongue
 
If its something you want im sure I can do something about it yes...
 
The enhanced version is a different dialog but yes I can add that into the same DLL with a different routine.  Adding this should be trivial.  I dont know when I will be able to get to it (because of the holidays) but I will post an enhanced version when I can.
Message 4 of 32
(10,492 Views)
Hey Altenbach Had some time over lunch to poke at it some and think this is what you were looking for...
Went ahead and added in the options for the enhanced functionality and resizing to boot.  Decided to make it a seperate DLL so users could pick and choose the most appropriate.  Happy coding!
 
 
0 Kudos
Message 5 of 32
(10,482 Views)
Hmmmmm.....
 
Tried under LabVIEW 8.0 and it is not functional 😞
 

Message Edited by altenbach on 12-16-2005 12:01 PM

0 Kudos
Message 6 of 32
(10,479 Views)
Its very strange (well what isnt when dealing with Microsoft code) Smiley Very Happy
 
I have been debugging that dialog on and off all day long with no real headway.  I cant tell exactly where the issue lies.  When you first load up the VI and hit run the treeview is missing.  However after that the dialog runs just fine with no issues.  If you exit LabVIEW and do it again the same thing happens.  The code looks correct and I have compared it side by side to code snips from 3rd party sites and also Microsoft.
 
I think I will have to chalk this up to gremlins...
 
0 Kudos
Message 7 of 32
(10,460 Views)

It looks like you don't need to write assembler code - you can use the built-in windows function.

This is a VI I found recently (I can't remember where) which does this. If you use 64 in the uFlags argument, you will get the dialog box that Altenbach wants. I've also included links to the structure's page on the MSDN and to the header file. If anyone wants to write a VI with a cluster with boolean inputs for all those options, it would be nice (remember that such options need to be ORed, or perhaps in this case, can be used with a boolean array to convert directly to a number).


___________________
Try to take over the world!
Message 8 of 32
(10,427 Views)
hi tst,
 
I'm using Ur VI in my application for the user to select a project folder.
 
But I dont know how to set that pop-up window as a modal dialog.
 
Can U pls clarify me reg which Windows API function call & which Dll should I use to set that modal dialog property ?
 
Waiting for Ur earliest reply all thro' the night in India...
 
Regards,
Partha.
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 9 of 32
(10,177 Views)
a) It's not my VI, I just found it.
b) It looks like you just need to give it the handle to the window which needs to be the parent window. You can get this handle by calling the FindWindow function (or by searching for the LVWinutil LLB on this site which should already have a VI calling this function).
 
If you want more information, I suggest you read the function's documentation in the MSDN.

___________________
Try to take over the world!
0 Kudos
Message 10 of 32
(10,156 Views)