How to group items for the Listview control (like in My Computer in Windows XP) using VB6?
Author |
Message |
Nand #1 / 22
|
How to group items for the Listview control (like in My Computer in Windows XP) using VB6?
Hi all, I have been using the Listview control for quite a while, however I would like to mimic the same visual grouping effect I see when you go to My Computer. There the items (drives) are groupped by categories (Hard Disk Drives, Scanners and Cameras, Removable Storages, etc.). So there seems to be a way a can programatically add items and group them when adding them to a Listview control, but I cannot see any methods or properties to do this, even after updating the mscomctl.ocx and comctl32.ocx from the 2005 update for VB6 at( http://www.*-*-*.com/ ). Thanks for any help.
|
Thu, 16 Dec 2010 04:27:23 GMT |
|
|
VB M #2 / 22
|
How to group items for the Listview control (like in My Computer in Windows XP) using VB6?
Sat, 28 Jun 2008 20:27:23 GMT bearing the following fruit: Quote: >Hi all, I have been using the Listview control for quite a while, however I >would like to mimic the same visual grouping effect I see when you go to My >Computer. There the items (drives) are groupped by categories (Hard Disk >Drives, Scanners and Cameras, Removable Storages, etc.). So there seems to >be a way a can programatically add items and group them when adding them to >a Listview control, but I cannot see any methods or properties to do this, >even after updating the mscomctl.ocx and comctl32.ocx from the 2005 update >for VB6 >at(http://www.microsoft.com/downloads/details.aspx?FamilyID=25437D98-51D...). >Thanks for any help.
MS don't use the VB6 listview. So you're going to have a hard time recreating what you see in windows with it. If it can be done, then you'll find code here http://vbnet.mvps.org/ If you can't find what you want there then you need to start looking at other controls that can give the effect you're after. -- Jan Hyde https://mvp.support.microsoft.com/profile/Jan.Hyde
|
Fri, 17 Dec 2010 16:24:58 GMT |
|
|
Jeremiah D. Seit #3 / 22
|
How to group items for the Listview control (like in My Computer in Windows XP) using VB6?
Quote:
>Hi all, I have been using the Listview control for quite a while, however I >would like to mimic the same visual grouping effect I see when you go to My >Computer. There the items (drives) are groupped by categories (Hard Disk >Drives, Scanners and Cameras, Removable Storages, etc.). So there seems to >be a way a can programatically add items and group them when adding them to >a Listview control, but I cannot see any methods or properties to do this, >even after updating the mscomctl.ocx and comctl32.ocx from the 2005 update >for VB6 >at(http://www.microsoft.com/downloads/details.aspx?FamilyID=25437D98-51D...). >Thanks for any help.
Try this : http://www.vbaccelerator.com/home/VB/Code/Controls/ListView/article.asp J. Jeremiah D. Seitz Omega Techware http://www.omegatechware.net
|
Fri, 17 Dec 2010 21:17:50 GMT |
|
|
Nand #4 / 22
|
How to group items for the Listview control (like in My Computer in Windows XP) using VB6?
Thanks Jan, but I didn't find the code there. Please let me know of any controls I can use in VB6 that offers the Listview features plus WinXP-style-grouping ability. -Nando
Quote:
> Sat, 28 Jun 2008 20:27:23 GMT bearing the following fruit: >>Hi all, I have been using the Listview control for quite a while, however >>I >>would like to mimic the same visual grouping effect I see when you go to >>My >>Computer. There the items (drives) are groupped by categories (Hard Disk >>Drives, Scanners and Cameras, Removable Storages, etc.). So there seems to >>be a way a can programatically add items and group them when adding them >>to >>a Listview control, but I cannot see any methods or properties to do this, >>even after updating the mscomctl.ocx and comctl32.ocx from the 2005 update >>for VB6 >>at(http://www.microsoft.com/downloads/details.aspx?FamilyID=25437D98-51D...). >>Thanks for any help. > MS don't use the VB6 listview. So you're going to have a > hard time recreating what you see in windows with it. > If it can be done, then you'll find code here > http://vbnet.mvps.org/ > If you can't find what you want there then you need to start > looking at other controls that can give the effect you're > after. > -- > Jan Hyde > https://mvp.support.microsoft.com/profile/Jan.Hyde
|
Sat, 18 Dec 2010 15:27:50 GMT |
|
|
Nand #5 / 22
|
How to group items for the Listview control (like in My Computer in Windows XP) using VB6?
Thanks Jeremiah, but I could not make the download code to compile. Actually, I had no idea this was going to be very complicated (there are tons of files, code and components that seem to be required to achieve such a simple thing. Why did Microsoft make it that crazy? That icon-grouping functionality has been around in XP since its release (2002). The way I see it, there should be a control just like Listview, with just an extra method, and parameter to add the name of the group or category for the Listitem to add. Why is there so much complexity to achieve this? -Nando Quote:
>>Hi all, I have been using the Listview control for quite a while, however >>I >>would like to mimic the same visual grouping effect I see when you go to >>My >>Computer. There the items (drives) are groupped by categories (Hard Disk >>Drives, Scanners and Cameras, Removable Storages, etc.). So there seems to >>be a way a can programatically add items and group them when adding them >>to >>a Listview control, but I cannot see any methods or properties to do this, >>even after updating the mscomctl.ocx and comctl32.ocx from the 2005 update >>for VB6 >>at(http://www.microsoft.com/downloads/details.aspx?FamilyID=25437D98-51D...). >>Thanks for any help. > Try this : > http://www.vbaccelerator.com/home/VB/Code/Controls/ListView/article.asp > J. > Jeremiah D. Seitz > Omega Techware > http://www.omegatechware.net
|
Sat, 18 Dec 2010 15:39:21 GMT |
|
|
VB M #6 / 22
|
How to group items for the Listview control (like in My Computer in Windows XP) using VB6?
Tue, 01 Jul 2008 07:27:50 GMT bearing the following fruit: Quote: >Thanks Jan, but I didn't find the code there. Please let me know of any >controls I can use in VB6 that offers the Listview features plus >WinXP-style-grouping ability. -Nando
It been so long since I used XP (Vista fanboy here) I can't remember what the screen looks like that your refering to. Anyhoo, grid controls might be worth a look. It might have to be a third party grid though as those that come with VB are quite basic. J Quote:
>> Sat, 28 Jun 2008 20:27:23 GMT bearing the following fruit: >>>Hi all, I have been using the Listview control for quite a while, however >>>I >>>would like to mimic the same visual grouping effect I see when you go to >>>My >>>Computer. There the items (drives) are groupped by categories (Hard Disk >>>Drives, Scanners and Cameras, Removable Storages, etc.). So there seems to >>>be a way a can programatically add items and group them when adding them >>>to >>>a Listview control, but I cannot see any methods or properties to do this, >>>even after updating the mscomctl.ocx and comctl32.ocx from the 2005 update >>>for VB6 >>>at(http://www.microsoft.com/downloads/details.aspx?FamilyID=25437D98-51D...). >>>Thanks for any help. >> MS don't use the VB6 listview. So you're going to have a >> hard time recreating what you see in windows with it. >> If it can be done, then you'll find code here >> http://vbnet.mvps.org/ >> If you can't find what you want there then you need to start >> looking at other controls that can give the effect you're >> after. >> -- >> Jan Hyde >> https://mvp.support.microsoft.com/profile/Jan.Hyde
-- Jan Hyde https://mvp.support.microsoft.com/profile/Jan.Hyde
|
Sat, 18 Dec 2010 18:28:11 GMT |
|
|
Nand #7 / 22
|
How to group items for the Listview control (like in My Computer in Windows XP) using VB6?
Sorry, I forgot to add a sample. Below some pictures I found online. This should be also possible in Windows Vista. Thanks for your assistance. <http://www.vbaccelerator.com/home/VB/Code/Controls/ListView/listView.png> <http://www.codeproject.com/KB/list/GroupListView/GroupListView.jpg> <http://getdotnetco.web119.discountasp.net/nexDotNet/030016ListView_Li...>
Quote:
> Tue, 01 Jul 2008 07:27:50 GMT bearing the following fruit: >>Thanks Jan, but I didn't find the code there. Please let me know of any >>controls I can use in VB6 that offers the Listview features plus >>WinXP-style-grouping ability. -Nando > It been so long since I used XP (Vista fanboy here) I can't > remember what the screen looks like that your refering to. > Anyhoo, grid controls might be worth a look. It might have > to be a third party grid though as those that come with VB > are quite basic. > J
>>> Sat, 28 Jun 2008 20:27:23 GMT bearing the following fruit: >>>>Hi all, I have been using the Listview control for quite a while, >>>>however >>>>I >>>>would like to mimic the same visual grouping effect I see when you go to >>>>My >>>>Computer. There the items (drives) are groupped by categories (Hard Disk >>>>Drives, Scanners and Cameras, Removable Storages, etc.). So there seems >>>>to >>>>be a way a can programatically add items and group them when adding them >>>>to >>>>a Listview control, but I cannot see any methods or properties to do >>>>this, >>>>even after updating the mscomctl.ocx and comctl32.ocx from the 2005 >>>>update >>>>for VB6 >>>>at(http://www.microsoft.com/downloads/details.aspx?FamilyID=25437D98-51D...). >>>>Thanks for any help. >>> MS don't use the VB6 listview. So you're going to have a >>> hard time recreating what you see in windows with it. >>> If it can be done, then you'll find code here >>> http://vbnet.mvps.org/ >>> If you can't find what you want there then you need to start >>> looking at other controls that can give the effect you're >>> after. >>> -- >>> Jan Hyde >>> https://mvp.support.microsoft.com/profile/Jan.Hyde > -- > Jan Hyde > https://mvp.support.microsoft.com/profile/Jan.Hyde
|
Sat, 18 Dec 2010 20:35:01 GMT |
|
|
Jeremiah D. Seit #8 / 22
|
How to group items for the Listview control (like in My Computer in Windows XP) using VB6?
Quote:
>Thanks Jeremiah, but I could not make the download code to compile. >Actually, I had no idea this was going to be very complicated (there are >tons of files, code and components that seem to be required to achieve such >a simple thing. Why did Microsoft make it that crazy?
I would recommend downloading the OCX itself first, to see if it's what you need. Once you know you want to use it, and it's stable enough, etc., then you can try integrating the code directly into your project. The component itself is here: http://www.vbaccelerator.com/home/VB/Code/Controls/ListView/VB6_ListV... Since the window needs to be subclassed, you'll need this component too : http://www.vbaccelerator.com/home/VB/Code/Libraries/Subclassing/SSubT... If you intend to use icons in the listview (very likely), you'll need to use Steve's ImageList control : http://www.vbaccelerator.com/home/VB/Code/Controls/ImageList/vbAccele... Finally, since you want grouping, you'll need to link to v6.0 of ComCtl32.dll using a manifest, and you must be running XP or higher. Quote: >That icon-grouping functionality has been around in XP since its release >(2002). The way I see it, there should be a control just like Listview, with >just an extra method, and parameter to add the name of the group or category >for the Listitem to add. Why is there so much complexity to achieve >this? -Nando
I wish I could tell you. The controls we can use "out of the box" in VB are neutered. If you want the full functionality, you need to do a little more work, or in this case, a lot. It's up to you to decide if the functionality is worth the trouble. J. Jeremiah D. Seitz Omega Techware http://www.omegatechware.net
|
Sat, 18 Dec 2010 21:39:55 GMT |
|
|
Bob O`Bo #9 / 22
|
How to group items for the Listview control (like in My Computer in Windows XP) using VB6?
Quote:
> That icon-grouping functionality has been around in XP since its release > (2002). The way I see it, there should be a control just like Listview, with > just an extra method, and parameter to add the name of the group or category > for the Listitem to add. Why is there so much complexity to achieve > this?
Perhaps because VB6 shipped in 1998? Bob --
|
Sun, 19 Dec 2010 01:46:30 GMT |
|
|
Jeff Johnso #10 / 22
|
How to group items for the Listview control (like in My Computer in Windows XP) using VB6?
Quote: > Why is there so much complexity to achieve this? -Nando
Simply put: VB has almost always followed the 80/20 rule: the devs made it very easy in VB to handle 80% of the things they felt the users would want to do on a regular basis. The other 20% requires jumping through hoops, some of which are often set on fire. It's just an unfortunate fact of VB. When Office Whatever (97?) came out with those cool command bars we all asked "How do we use those?" And the answer was, "Sorry, you're screwed." VB6 addressed that...to a point. You still couldn't drag and dock them, so, like I said, we got SOME functionality "for free," but not everything.
|
Sun, 19 Dec 2010 03:20:00 GMT |
|
|
Nand #11 / 22
|
How to group items for the Listview control (like in My Computer in Windows XP) using VB6?
Thanks Bob, I wish MS have updated VB6 properly, because I bought my copy in 2000, and they have been releasing service packs and updates (including control updates all the way through 2004) and even some more updates later. I can see how they have not "truly" updated anything at all. The worst thing is that even recent products like Office 2003 have the same lack of compatibility. See, Microsoft have made VBA6 (Visual Basic 6 for Applications) the standard for programming and customizing MS Office products and solutions. And even with Microsoft Access 2003 (that is not that old) I have the very same incompatibility issues. I adopted VB6 mainly because of the integration with Microsoft Office products. But Microsoft tricked me, maintained the lie all long, and epic-failed it. I should had stayed with C instead back then. It sounds I won't be able to update some of my VB6 and MS Office apps, without rewriting everything into something new. I'm trying to see beyond now, but I have my doubts, because if I move ahead with a new MS developer package I may run into the same Microsoft trap. I cannot trust MS and whoever was behind that VB mess. Quote:
>> That icon-grouping functionality has been around in XP since its release >> (2002). The way I see it, there should be a control just like Listview, >> with just an extra method, and parameter to add the name of the group or >> category for the Listitem to add. Why is there so much complexity to >> achieve this? > Perhaps because VB6 shipped in 1998? > Bob > --
|
Sun, 19 Dec 2010 08:02:19 GMT |
|
|
Bob O`Bo #12 / 22
|
How to group items for the Listview control (like in My Computer in Windows XP) using VB6?
Quote:
> I adopted VB6 mainly because of the integration with Microsoft Office > products. But Microsoft tricked me, maintained the lie all long, and > epic-failed it. I should had stayed with C instead back then. It sounds I > won't be able to update some of my VB6 and MS Office apps, without rewriting > everything into something new. I'm trying to see beyond now, but I have my > doubts, because if I move ahead with a new MS developer package I may run > into the same Microsoft trap. I cannot trust MS and whoever was behind that > VB mess.
Welcome to the club. ...Maybe some day I'll actually build one at VBCurmudgeon.com Bob --
|
Sun, 19 Dec 2010 08:21:33 GMT |
|
|
Nand #13 / 22
|
How to group items for the Listview control (like in My Computer in Windows XP) using VB6?
Thanks Jeff, all these years I have been working around all these compatibility/usability issues with VB, but this is the last drop. I realize how messy all this VB6 and Visual Basic for Application really are. I agree, VB6 is such a crippled development solution, but I did not know back then. In fact Microsoft have worked hard to prove differently. See, I was lured into the adventure because Microsoft made all these Office applications workable only with Visual Basic. Not only they marketed the product as a cool programming environment, but pushed it into all Office programs and version all they way (even 2003), from where I have ran into problems too. Microsoft even kept consistently releasing those "MS Office Developer" editions (97/2000/XP/2003), setting a place for a development platform that is really not there. I'll have to ask you guys about the next (non-hyped) development platform. Quote:
>> Why is there so much complexity to achieve this? -Nando > Simply put: VB has almost always followed the 80/20 rule: the devs made it > very easy in VB to handle 80% of the things they felt the users would want > to do on a regular basis. The other 20% requires jumping through hoops, > some of which are often set on fire. It's just an unfortunate fact of VB. > When Office Whatever (97?) came out with those cool command bars we all > asked "How do we use those?" And the answer was, "Sorry, you're screwed." > VB6 addressed that...to a point. You still couldn't drag and dock them, > so, like I said, we got SOME functionality "for free," but not everything.
|
Sun, 19 Dec 2010 08:27:53 GMT |
|
|
Nand #14 / 22
|
How to group items for the Listview control (like in My Computer in Windows XP) using VB6?
Thanks Jeremiah, I have installed the control creating a .CMD/.BAT (see below). I have tested the control under VB6 with only few issues: One is that I cannot re-arrange the icons manually under any view (I would like to move the icons around to any position on the listview when dragging --The standard Listview does this effortlessly). The other thing is that I tried to add this listview control to a MS Access XP form, but it does not show under the ActiveX form's list (although the vbalIml6.ocx does show and works). Does this have to do with how I installed the design-time files (.TLB)? How do I register those? ; ------------------------.CMD file------------------------- CLS COPY vbaListView6.ocx %SystemRoot%\System32\ COPY vbalIml6.ocx %SystemRoot%\System32\ COPY SSubTmr6.dll %SystemRoot%\System32\ COPY ISHF_Ex.tlb %SystemRoot%\System32\ COPY OLEGUIDS.TLB %SystemRoot%\System32\ REGSVR32 /S %SystemRoot%\System32\vbaListView6.ocx REGSVR32 /S %SystemRoot%\System32\vbalIml6.ocx REGSVR32 /S %SystemRoot%\System32\SSubTmr6.dll PAUSE EXIT ; -------------------------------------------------------------
Quote:
>>Thanks Jeremiah, but I could not make the download code to compile. >>Actually, I had no idea this was going to be very complicated (there are >>tons of files, code and components that seem to be required to achieve >>such >>a simple thing. Why did Microsoft make it that crazy? > I would recommend downloading the OCX itself first, to see if it's > what you need. Once you know you want to use it, and it's stable > enough, etc., then you can try integrating the code directly into your > project. > The component itself is here: > http://www.vbaccelerator.com/home/VB/Code/Controls/ListView/VB6_ListV... > Since the window needs to be subclassed, you'll need this component > too : > http://www.vbaccelerator.com/home/VB/Code/Libraries/Subclassing/SSubT... > If you intend to use icons in the listview (very likely), you'll need > to use Steve's ImageList control : > http://www.vbaccelerator.com/home/VB/Code/Controls/ImageList/vbAccele... > Finally, since you want grouping, you'll need to link to v6.0 of > ComCtl32.dll using a manifest, and you must be running XP or higher. >>That icon-grouping functionality has been around in XP since its release >>(2002). The way I see it, there should be a control just like Listview, >>with >>just an extra method, and parameter to add the name of the group or >>category >>for the Listitem to add. Why is there so much complexity to achieve >>this? -Nando > I wish I could tell you. The controls we can use "out of the box" in > VB are neutered. If you want the full functionality, you need to do a > little more work, or in this case, a lot. It's up to you to decide if > the functionality is worth the trouble. > J. > Jeremiah D. Seitz > Omega Techware > http://www.omegatechware.net
|
Fri, 24 Dec 2010 05:35:13 GMT |
|
|
Nand #15 / 22
|
How to group items for the Listview control (like in My Computer in Windows XP) using VB6?
OK, I figured out that how I install those .TLB files: REGTLIB %SystemRoot%\System32\ISHF_Ex.tlb REGTLIB %SystemRoot%\System32\OLEGUIDS.TLB However the Listview still does not show in MS Access ActiveX box. So I cannot use it in a form. Any ideas? Also any ideas on how to allow manually reposition of the icons? Thanks! Quote:
> Thanks Jeremiah, I have installed the control creating a .CMD/.BAT (see > below). I have tested the control under VB6 with only few issues: One is > that I cannot re-arrange the icons manually under any view (I would like > to move the icons around to any position on the listview when > dragging --The standard Listview does this effortlessly). The other thing > is that I tried to add this listview control to a MS Access XP form, but > it does not show under the ActiveX form's list (although the vbalIml6.ocx > does show and works). Does this have to do with how I installed the > design-time files (.TLB)? How do I register those? > ; ------------------------.CMD file------------------------- > CLS > COPY vbaListView6.ocx %SystemRoot%\System32\ > COPY vbalIml6.ocx %SystemRoot%\System32\ > COPY SSubTmr6.dll %SystemRoot%\System32\ > COPY ISHF_Ex.tlb %SystemRoot%\System32\ > COPY OLEGUIDS.TLB %SystemRoot%\System32\ > REGSVR32 /S %SystemRoot%\System32\vbaListView6.ocx > REGSVR32 /S %SystemRoot%\System32\vbalIml6.ocx > REGSVR32 /S %SystemRoot%\System32\SSubTmr6.dll > PAUSE > EXIT > ; -------------------------------------------------------------
|
Fri, 24 Dec 2010 07:01:23 GMT |
|
|
Page 1 of 2
|
[ 22 post ] |
|
Go to page:
[1]
[2] |
|