|
-
Mar 28th, 2022, 05:28 PM
#1
Thread Starter
PowerPoster
Is there a way to use a listview without dependency? Or a work around?
Hi there everyone. I am working on a program to test students in Math. The program records the results in a listview. The program works great, however on my school laptop, it needs a few ocx files because of the dependencies because of the listview and tab strip. I am running the program from a usb drive because I update it often. Is there a way to have a listview without a dependency, or is there a work around where I can put the ocx files on the flash drive?
I don't want to make an installer because I want keep it as a portable app, but I'm wondering what my options are with the listview.
Thanks!
-
Mar 28th, 2022, 06:02 PM
#2
Re: Is there a way to use a listview without dependency? Or a work around?
There's several options.
-You can use a sxs manifest which will allow you to have the .ocx in your app folder, with no installation or registration needed. See this thread.
-You can use a ListView replacement like Krool's in StdEXE mode... add all the ListView components in that folder, ComCtlsBase.bas, Common.bas, VisualStyles.bas, VTableHandle.bas, Enumeration.cls, ISubclass.cls, and VTableSubclass.cls, and a reference to the OLEGuids TLB it comes with (a TLB is an IDE-only reference, you do not include it with your .exe).
-You can implement the ListView using pure API yourself (use CreateWindowEx to create it, etc)
The first option is probably the easiest alas none of the options are particularly easy.
-
Mar 28th, 2022, 07:18 PM
#3
Thread Starter
PowerPoster
Re: Is there a way to use a listview without dependency? Or a work around?
Hi there and thank you for you help. I'm going to try the manifest idea. I need to create the manifest file with the Microsoft Common Controls 6.0 (SP6), and the Microsoft Tabbed Dialog Control 6.0 (SP6).
I grabbed this snippet from the other thread you linked. This is referring to the Rich Text Box Control, but I was wondering what I would change beside the name of the control?
VB Code:
<file name="Dependencies\Richtx32.ocx">
<comClass description="Microsoft Rich Textbox Control 6.0 (SP6)" clsid="{3B7C8860-D78F-101B-B9B5-04021C009402}" threadingModel="Apartment" progid="RICHTEXT.RichtextCtrl" tlbid="{3B7C8863-D78F-101B-B9B5-04021C009402}" />
<comClass description="RichText General Property Page Object" clsid="{78E5A540-1850-11CF-9D53-00AA003C9CB6}" />
<comClass description="RichText Apppearance Property Page Object" clsid="{AFC634B0-4B8B-11CF-8989-00AA00688B10}" />
<comClass description="Microsoft Rich Textbox Control 6.0 (SP6)" clsid="{B617B991-A767-4F05-99BA-AC6FCABB102E}" threadingModel="Apartment" />
<typelib tlbid="{3B7C8863-D78F-101B-B9B5-04021C009402}" version="1.2" helpdir="" />
</file>
Thanks!
-
Mar 28th, 2022, 07:28 PM
#4
Re: Is there a way to use a listview without dependency? Or a work around?
Here's a link to a complete tutorial in SxS usage.
And, within that thread, here's a post that has everything for using MsComCtl.ocx, which has the ListView in it.
And here's a CodeBank topic that shows how to use Krool's controls for onesie-twosie usage, including the ListView.
Last edited by Elroy; Mar 28th, 2022 at 07:32 PM.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|