• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

Directory tree and file list controls

Started by Eros Olmi, January 23, 2008, 07:02:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Eros Olmi

I need to add a directory tree and a file list to the arsenal of thinBasic script language. The same treeviw and listview present into standard Explorer window.
I was wondering if there are controls already done for this job or I need to build by myself.

Thanks a lot
Eros
thinBasic Script Interpreter - www.thinbasic.com | www.thinbasic.com/community
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

Patrice Terrier

#1
Eros,

I have one, see it there the C# version using zBff.dl:
http://www.zapsolution.com/winlift/ccorner.htm
then search for zExplorer.

Screen shot of the C# zExplorer using zBff.dll:




Screen shot of the WinDev zExplorer using also zBff.dll.



Note: zBff is written in PowerBASIC.

and you can see it in action, in PowerBASIC applications, if you download any of my ZAP Media product there:
http://www.zapsolution.com/zmsidxus.htm


and here is another screen shot for my WinDev wTune project:




Note: zBff represent a fairly amount of advanced SDK coding style that was written several years ago, with the contribution of Edwin, Semen, and myself (tooks me 6 monthes work to get the final version).

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Eros Olmi

#2
What? 6 months of work? Said from a guru like you (I'm serious here) it must be quite complex task.

Images seems talking by themself about what a great job all you did. From the readme you stated it is free. Can I use for distributing inside thinBasic?

In any case I will test it this night when back home.

Thanks a lot.
Eros
thinBasic Script Interpreter - www.thinbasic.com | www.thinbasic.com/community
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

Patrice Terrier

Yes, it was a huge amount of work, believe me!

I am not speaking of the code size there, but the complexity of interaction with low level COM programming and the IShellFolder interface using $IShellFolderGUID = GUID$("{000214E6-0000-0000-C000-000000000046}"), with a tool (PB6-PB7) that was not towered to low level COM programming.

Note: zBff is not freeware, but it could be used for free with either WinDev or C#.

Indeed zBff and its extension ZAP Media Browser is able to do, all what could be done with Explorer!
ZAP Media browser uses several thread to monitor disk activity and USB port detection, as well as CD/DVD insertion etc.

The problem for thinBasic, is that I didn't wrote any example showing how to use it with PB.
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Eros Olmi

#4
Any PowerBasic include file can be used with thinBasic almost natively except MACROs and other few things. Also COM interfaces are not handled. ThinBasic can inteface with any standard DLL (exactly like PB deos) but on the fly during script execution.

Anyhow, I will test by myself but if it is not freeware I cannot use.

Thanks in any case.
Ciao
Eros
thinBasic Script Interpreter - www.thinbasic.com | www.thinbasic.com/community
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

Patrice Terrier

#5
Eros,

You can always try the C# version, you will find the EXE and the "free" zBff.dll inside of the project \BIN subfolder.

The main exe name is: zExplorer.exe.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

Eros,

While using zExplorer, double clic on any file to run it with the associated software.

While in the TreeView, right clic the mouse button to popup the contextual menu.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

Eros,

One thing more: zExplorer (zBff) works not only with XP but also with VISTA.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Eros Olmi

#8
OK Patrice.

I think the only problem now is if I can use zBff for free or not :D

I was able to use zBff in thinBasic scripts. See attached file for testing.
To execute thinBasic script you need to install latest thinBasic preview version 1.6.0.1 downloadable from thinBasic web site at http://www.thinbasic.com/index.php?option=com_docman&task=cat_view&gid=19&Itemid=66
Otherwise I've also included a bundled executable created with thinBasic bundler. A bundled exe is something like a ZIP file that have inside all what is needed by the thinBasic script to be executed like a normal exe.

So far thinBasic and zBff seem working perfectly together. I've not done any interaction with it but seems quite easy.

Let me know about if I can use it or not as distributable dll inside thinBasic official distibution: if possible, and what are the rules.
If not possible, it has been a pleasure in any case. I will try to find another road.

Ciao
Eros

UPDATES:

  • attached file updated. Added interaction with zBff treeview detecting selction change and right click
thinBasic Script Interpreter - www.thinbasic.com | www.thinbasic.com/community
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

Patrice Terrier

#9
Eros,

Yes, you can use the zBff.dll provided with the C# version, if it runs fine with thinBasic.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Eros Olmi

Attached file updated.
Added interaction with zBff detecting selection change and right click
thinBasic Script Interpreter - www.thinbasic.com | www.thinbasic.com/community
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

Eros Olmi

#11
Patrice,

I've noticeded that in c# example right clicking on a tree item does not change the current selected item. Is this by design? Can it be changed?
For example if selected item is C:\temp and you right click on a different directory choosing, for example, Rename from menu, it renames C:\temp while right click was on another tree item. Explorer behave differently. RIght click change selected item.

Just to know in case there is a way to change this behave.
Thanks in advance.
Eros
thinBasic Script Interpreter - www.thinbasic.com | www.thinbasic.com/community
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

Patrice Terrier

Yes, this is by design, left mouse button to select, right mouse button to show the popup menu without changing the current selection.
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Eros Olmi

Patrice,

in my tests with zBff I've found a situation where zBff seems looping and showing always the same structure.
It happen when you enter, for example, special folder "Cronology" under user settings. See attached image.
Standard explorer behave when this special folder is selected is to unselect it and move selection to the parent folder.

Ciao
Eros
thinBasic Script Interpreter - www.thinbasic.com | www.thinbasic.com/community
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

Patrice Terrier

--Eros

On VISTA "Documents and settings" is a protected folder, you can't access it, see attached screen shot.

I think you should write your own BrowseForFolder control starting from existing source code:

http://www.codeproject.com/KB/tree/treeviewexplorer.aspx
http://www.c-sharpcorner.com/UploadFile/nkumar/WindowsExplorerinCSharp11292005230454PM/WindowsExplorerinCSharp.aspx
http://support.microsoft.com/kb/306285

From the top of my head i think that there was somewhere a Borje's example showing how to embed a BFF inside of another window (Poff?)
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com