Explorer-TreeView in VB.NET

The place for threads about version 1.x of TimoSoft ExplorerTreeView.
WoF
Lt. Commander
Posts: 43
Joined: 04 Aug 2005, 13:18

Explorer-TreeView in VB.NET

Post by WoF »

Hello TiKu,

it's been long time we last talked. I hope you are still up and about, still feeling well and still supporting this forum. It was always nice to discuss stuff with you.

After this long years, where your TreeView has worked successfully and reliably in my old project, I got a new one, where the simple task is, to pick a path from the file system with your Explorer-Treeview. The difference here being: it is not VB6 anymore but VB.NET. I work currently with the VS.NET 2008 Express.
I reduced the problem to the most simple project: a Form and on it your TreeView. I got the latest version from your site. When running, it shows properly the Tree according to specs set in the options. (I want it only to show File-System-Objects, like drives and Folders).
But when clicking on it or on an item, the events do not seem to fire. I simply put a msgbox in the ClickEvent and one in the ItemClick event, but none of them seem to fire.
It seems I'm doing something essential false here. What is it.
WoF
Lt. Commander
Posts: 43
Joined: 04 Aug 2005, 13:18

Re: Explorer-TreeView in VB.NET

Post by WoF »

Oh, and although I have addresssed Tiku personally, I'd appreciate and value everybody else's Input on that behalf. Anybody who knows why the events do not fire under VB.NET, pls help me.
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Explorer-TreeView in VB.NET

Post by TiKu »

Hi,

To be honest I've never tested with VB.NET. I've created a System Windows Forms test project with VB.NET 2010 and dragged the control onto the Form. When starting the application, it throws an exception that it is missing Interop.VBRUN 6.0.0.0 or a dependency. Seems like some project config is wrong. Can you help me so I can try to help you? :D

Regards
TiKu
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Explorer-TreeView in VB.NET

Post by TiKu »

Nevermind, I've found it myself: You need to set "Embed Interop Types" to False for the references to MSDATASRC, stdole, VBRUN and so on.

Well, the Click event works for me:

Code: Select all

Public Class Form1

	Private Sub AxExplorerTreeView1_ClickEvent(sender As System.Object, e As System.EventArgs) Handles AxExplorerTreeView1.ClickEvent
		MessageBox.Show("bla")
	End Sub
End Class
The control is completely in its default config. I've attached the sample project.
Attachments
WindowsApplication1.7z
(90.35 KiB) Downloaded 479 times
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
WoF
Lt. Commander
Posts: 43
Joined: 04 Aug 2005, 13:18

Re: Explorer-TreeView in VB.NET

Post by WoF »

Hey, thanks for your prompt late-night-reply. I had given up by then. :)
Good to talk to you again. Hope you are well.

I will try the sample on my computer and see if I get along.
We tried a similar thing just now on a friend's computer, where it worked also well. But I noticed that when the ItemClickEvent event fires (also the ClickEvent) , the path hasn't yet changed. That means when I click on another folder, the path shows still the previous folder. This is a little unfortunate, because when clicking a tree item (folder) I want to display its contents and not the contents of the previous folder. Can this behaviour be changed? Or am I supposed to use a different event for that purpose?
WoF
Lt. Commander
Posts: 43
Joined: 04 Aug 2005, 13:18

Re: Explorer-TreeView in VB.NET

Post by WoF »

Ok, it seems I couldn't run your project because it opened in VS2013 and then popped errors. I didn't even want to follow (because I do not like 2013 very much), so I did as per your suggestions:
First I installed 1.15.1 of your Explorer-Treeview.
Then I created a new project, added the reference and plopped the control on the form.
It worked immediately without errors. That's very good success so far. :)
I added a textbox to show the current path on events happening.

The effect is the same as I described. Only when I click on an item for the second time the proper path is displayed. That means the ClickEvent and ItemClickEvent occurs before the tree has changed its path. Which event do I have to use to get the proper path after the mouse click?
WoF
Lt. Commander
Posts: 43
Joined: 04 Aug 2005, 13:18

Re: Explorer-TreeView in VB.NET

Post by WoF »

Nevermind, sorry to have bothered you. I think I found out myself: The _SelChanged fires exactly when the path has changed, so that is rather what I need. Thanks again.

Say, you still working on these VB6 controls? Personally I still love VB6 and think it is such a fine and fast tool to make even complex applications. VB.NET is large, if not huge, heavy and clumsy and cumbersome (2013 even more than 2008. 2008 I slowly started to like).
Your TreeView is such a wonderful control and I wouldn't miss it, slowly processing over to the .NET-world.
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Explorer-TreeView in VB.NET

Post by TiKu »

Hi,

I'm fine, thanks. I want to reply to this part of your post:
WoF wrote: 01 Dec 2017, 20:33 Say, you still working on these VB6 controls? Personally I still love VB6 and think it is such a fine and fast tool to make even complex applications. VB.NET is large, if not huge, heavy and clumsy and cumbersome (2013 even more than 2008. 2008 I slowly started to like).
Your TreeView is such a wonderful control and I wouldn't miss it, slowly processing over to the .NET-world.
Well, ExplorerTreeView 1.x is dead. I have not been working on it for 3 years and its successor has been published like 9 years ago. The other controls are kind of resting since 1,5 years. Let me explain why.
Until Windows 7 Windows has been my favorite system. I enjoyed writing software for it. I really dislike Windows 8 and Windows 10. Linux has become my favorite system, also because at work I have been doing quite a lot with Linux during the last 3 years. Win32 seems to be dead for Microsoft. The .NET framework never attracted me sufficiently to use it for private projects.
So I've lost a lot of the motivation that kept me working on these controls for 15 years. My focus has moved to Android apps, modern web sites, cloud computing, and artifical intelligence. But it is not very likely that I'll publish private projects in these areas, because practically 100% of what I'm doing in these areas is for my job - there are very interesting and motivating projects.
For me, Windows does not play a big role anymore. Of course my computer in the office runs Windows and most of the time I'm working on a VB6/C# project there. But this is mainly for earning money. The things that motivate me nowadays have little to do with Windows or Microsoft.

Coming back to the controls... I have not yet decided what to do with them. From time to time I fix minor bugs that are being reported. I plan to publish the sourcecode on GitHub one day, but currently it still feels like giving away your baby, therefore I've not yet done it.

Best regards
TiKu
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
WoF
Lt. Commander
Posts: 43
Joined: 04 Aug 2005, 13:18

Re: Explorer-TreeView in VB.NET

Post by WoF »

I fully agree with your disliking of Windows 10. I never even touched Win 8 or 8.1 and I'm disgusted that they will discontinue Win 7 support. I have seen VB6 running under Win10, where you practically cannot use the form-designer anymore. It has become a little clumsy under win7 already, but under win10 it is not practicable anymore.

I have worked a little with Linux either, but have never come around to write programs under it. I read that there was a project called K-Basic, which was trying to implement VB6 under Linux but I never had the time to try it out. It is a german guy publishing it. Sounds interesting to me for the future.

Concerning your TreeViews: I saw that there was a 2.x but I noticed that you have to add the Explorer capability separately, so I stuck to 1.5x because I wanted quick results. I have not come around yet to study 2.x and its externally added Shell-Extension. Maybe it is even better than 1.5x.

What are you saying? You can really earn money by working on a VB6/C# project nowadays? ;) That's tempting. :D

Anyway, I understand, that you don't want to give away your babies. Did you write them in C++?
WoF
Lt. Commander
Posts: 43
Joined: 04 Aug 2005, 13:18

Re: Explorer-TreeView in VB.NET

Post by WoF »

You need to set "Embed Interop Types" to False for the references to MSDATASRC, stdole, VBRUN and so on.
How do you do that? Not that it has become necessary in my project yet currently, but that VBRUN popped up an error time and again in converted VB6 progs.

Kind regards

Wolfgang
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Explorer-TreeView in VB.NET

Post by TiKu »

WoF wrote: 02 Dec 2017, 03:26 I fully agree with your disliking of Windows 10. I never even touched Win 8 or 8.1 and I'm disgusted that they will discontinue Win 7 support. I have seen VB6 running under Win10, where you practically cannot use the form-designer anymore. It has become a little clumsy under win7 already, but under win10 it is not practicable anymore.
We use Windows 10 at work. I don't need the Form designer very often, so out of my head I cannot tell you whether it works well.
With Windows 10 I feel like a tolerated guest and not like the owner of the system. This is annoying.
WoF wrote: 02 Dec 2017, 03:26I have worked a little with Linux either, but have never come around to write programs under it. I read that there was a project called K-Basic, which was trying to implement VB6 under Linux but I never had the time to try it out. It is a german guy publishing it. Sounds interesting to me for the future.
Well, I prefer languages that look more like C. VB6 was great for learning and somehow I still like its simplicity, but I'm not really a fan of its syntax.
WoF wrote: 02 Dec 2017, 03:26Concerning your TreeViews: I saw that there was a 2.x but I noticed that you have to add the Explorer capability separately, so I stuck to 1.5x because I wanted quick results. I have not come around yet to study 2.x and its externally added Shell-Extension. Maybe it is even better than 1.5x.
Using version 2 would require that you rewrite quite some code. It follows a more generic concept. This makes it more powerful, but also a bit more difficult to use in the beginning. I suggest you have a look at the samples and the features and play around with it.
WoF wrote: 02 Dec 2017, 03:26What are you saying? You can really earn money by working on a VB6/C# project nowadays? ;) That's tempting. :D
Actually we have big problems to find good VB6 developers, because they usually are already quite old or are not professional/skilled enough or both. So if you are a good developer, know the new stuff, but also are skilled in VB6, you can earn quite some money. ;)
WoF wrote: 02 Dec 2017, 03:26Anyway, I understand, that you don't want to give away your babies. Did you write them in C++?
ExplorerTreeView 1.x and Flatbutton have been written in VB6. The other controls have been written in C++.

Regards
TiKu
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Explorer-TreeView in VB.NET

Post by TiKu »

WoF wrote: 02 Dec 2017, 03:38
You need to set "Embed Interop Types" to False for the references to MSDATASRC, stdole, VBRUN and so on.
How do you do that? Not that it has become necessary in my project yet currently, but that VBRUN popped up an error time and again in converted VB6 progs.
Make sure that you see all files in the Solution Explorer. Then go to References, single-click each reference, open its properties and set the "Embed Interop Types" to False.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
WoF
Lt. Commander
Posts: 43
Joined: 04 Aug 2005, 13:18

Re: Explorer-TreeView in VB.NET

Post by WoF »

When I click on one of the Reference items, the properties are shown in the properties window below, but the "Embed Interop Types" does not appear there. Only 2 properties of 10 are available for change. They are "Copy Local" (true) and "Isolated" (false) for VBRUN.
I am using VS2008 currently.
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Explorer-TreeView in VB.NET

Post by TiKu »

WoF wrote: 02 Dec 2017, 19:27 I am using VS2008 currently.
Maybe this is a feature of VS 2010 and above.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
deservengg
Cadet
Posts: 2
Joined: 29 Nov 2017, 10:27

Re: Explorer-TreeView in VB.NET

Post by deservengg »

Dear Tiku,
Unfortunately what you mentioned about 2010 about this "Embed Interop Types" is not at all available in 2008-2010- 2013.
Can I ask you where are you getting this, this is becoming interesting now to me.

It is not there really anywhere in all the aforementioned versions.
you replied to Mr.WoF "Maybe this is a feature of VS 2010 and above."
but this seems ambiguous. :(
Regards
Deserve.
Post Reply