Explorer-TreeView in VB.NET
Explorer-TreeView in VB.NET
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.
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.
Re: Explorer-TreeView in VB.NET
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.
Re: Explorer-TreeView in VB.NET
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?
Regards
TiKu
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?
Regards
TiKu
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Boycott DRM! Boycott HDCP!
Re: Explorer-TreeView in VB.NET
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:
The control is completely in its default config. I've attached the sample project.
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
- Attachments
-
- WindowsApplication1.7z
- (90.35 KiB) Downloaded 913 times
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Boycott DRM! Boycott HDCP!
Re: Explorer-TreeView in VB.NET
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?
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?
Re: Explorer-TreeView in VB.NET
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?
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?
Re: Explorer-TreeView in VB.NET
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.
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.
Re: Explorer-TreeView in VB.NET
Hi,
I'm fine, thanks. I want to reply to this part of your post:
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
I'm fine, thanks. I want to reply to this part of your post:
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.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.
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!
Boycott DRM! Boycott HDCP!
Re: Explorer-TreeView in VB.NET
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.
Anyway, I understand, that you don't want to give away your babies. Did you write them in C++?
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.
Anyway, I understand, that you don't want to give away your babies. Did you write them in C++?
Re: Explorer-TreeView in VB.NET
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.You need to set "Embed Interop Types" to False for the references to MSDATASRC, stdole, VBRUN and so on.
Kind regards
Wolfgang
Re: Explorer-TreeView in VB.NET
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.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.
With Windows 10 I feel like a tolerated guest and not like the owner of the system. This is annoying.
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: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.
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: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.
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.
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!
Boycott DRM! Boycott HDCP!
Re: Explorer-TreeView in VB.NET
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!
Boycott DRM! Boycott HDCP!
Re: Explorer-TreeView in VB.NET
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.
I am using VS2008 currently.
Re: Explorer-TreeView in VB.NET
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!
Boycott DRM! Boycott HDCP!
-
- Cadet
- Posts: 2
- Joined: 29 Nov 2017, 10:27
Re: Explorer-TreeView in VB.NET
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.
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.