[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.vb.general.discussion

DriveListBox & DirListBox

BeeJ

12/7/2011 10:46:00 PM

Ancient but useful; however:

1) Is there a best replacement for these?
e.g. maybe multiselect on folders.
e.g. all in one like Windows Explorer.
maybe a UC or not
On the form, not another window. (is there a way to stick one of those
API windows on to a form?)

2) Is there a way to use Drive and the other related without using
these controls? i.e. no hidden form containing these.
e.g. trying to use the Drive and Folders of filesystemobject without
using filesystemobject.


10 Answers

BeeJ

12/8/2011 1:55:00 AM

0

Just finished converting Randy's folder tree to a UC.
FindFirstFile: Enumerate Folders to a TreeView, Advanced

What a nightmare creating a UC sort of backwards.
So many errors that made no sense.

So what are the correct step to create a UC when you have a form and a
module to turn into a UC? It kept getting wrapped around the axel.


Dee Earley

12/8/2011 10:57:00 AM

0

On 07/12/2011 22:46, BeeJ wrote:
> Ancient but useful; however:
>
> 1) Is there a best replacement for these?
> e.g. maybe multiselect on folders.
> e.g. all in one like Windows Explorer.
> maybe a UC or not
> On the form, not another window. (is there a way to stick one of those
> API windows on to a form?)

It depends what you want. You can edit the frame for the standard
open/save dialogs but I expect it's more C orientated.

I THINK there are shell objects you can embed too, but again is heavily
tied into the C/C++ way of doing things.

If you want to do it yourself, there are various shell enumeration API
functions that allow you to get the information and display it in your
own UI (Listview, Treeview, etc)

> 2) Is there a way to use Drive and the other related without using these
> controls? i.e. no hidden form containing these.
> e.g. trying to use the Drive and Folders of filesystemobject without
> using filesystemobject.

You can enumerate shell objects (My computer, control panel, etc) or use
use the plain drive and directory enumeration functions like
GetLogicalDrives() and FindFirst/NextFile().

--
Deanna Earley (dee.earley@icode.co.uk)
i-Catcher Development Team
http://www.icode.co.uk...

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)

Dee Earley

12/8/2011 11:50:00 AM

0

On 08/12/2011 01:55, BeeJ wrote:
> So what are the correct step to create a UC when you have a form and a
> module to turn into a UC? It kept getting wrapped around the axel.

There is no correct way, it is very specific to the code that's being moved.
Personally, I'd move the form contents and code into a new user control
first, and fixup/rewrite any parts that are specific to the container,
and leave the module code separate.

--
Deanna Earley (dee.earley@icode.co.uk)
i-Catcher Development Team
http://www.icode.co.uk...

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)

DanS

12/9/2011 12:44:00 AM

0

BeeJ <nospam@spamnot.com> wrote in
news:jbp5dm$1p1$1@speranza.aioe.org:

> Just finished converting Randy's folder tree to a UC.
> FindFirstFile: Enumerate Folders to a TreeView, Advanced
>
> What a nightmare creating a UC sort of backwards.
> So many errors that made no sense.
>
> So what are the correct step to create a UC when you have a
> form and a module to turn into a UC? It kept getting
> wrapped around the axel.

I did the same thing years ago from a sample from some Brad
Martinez.

http://btmtz.mvps.org/v...

This seems to be a fairly full implementaion of the
ShellTreeView control with context menu's and all.

I stripped it down and wrapped the treeview functions into an
ocx that ended up at 80K in size.

It seems to work still.

Did you ask here if anyone had one ? I appologize for not
seing the msg if you did.


DanS





GS

12/9/2011 5:33:00 PM

0

Brad's vbexplorer is excellent! I tried it a few years back for a
custom project that reads/writes NTFS summary properties as imbedded
text in plain text files. (Allowed read/write on non-NTFS volumes)

Brad's project doesn't provide all the bells&whistles of WE but it does
cover all the basics as far as file/folder explorers goes. I moved on
to 3rd party stuff because I wanted features more easily had/maintained
but that's just because I didn't want to provide/service a 'basic'
version with my files manager app.

--
Garry

Free usenet access at http://www.eternal-sep...
ClassicVB Users Regroup! comp.lang.basic.visual.misc



.

BeeJ

12/11/2011 9:42:00 PM

0

Finally go it working the way I want as both an in-project UC and a
stand alone UC .ocx.

But can someone explain what the differences are beside:
(1) .ocx is "portable" but has to be installed with an app.
(2) .ocx update affects all app usage.
(3) in-project is not neatly in project list if the UC uses classes
and modules.
(4) in-project won't break another app when UC code is
"fixed/revised".



--- Posted via news://freenews.netfront.net/ - Complaints to news@netfront.net ---

BeeJ

12/11/2011 9:45:00 PM

0

Yikes! too many right ways to do it each with problems.

If I can find a SATA switch then I would install two HDs, one with Win7
and one with XP and then throw the switch and reboot.

Anybody have a SATA switch?



--- Posted via news://freenews.netfront.net/ - Complaints to news@netfront.net ---

ralph

12/12/2011 4:02:00 AM

0

On Sun, 11 Dec 2011 13:42:20 -0800, BeeJ <nospam@spamnot.com> wrote:

>Finally go it working the way I want as both an in-project UC and a
>stand alone UC .ocx.
>
>But can someone explain what the differences are beside:
> (1) .ocx is "portable" but has to be installed with an app.
> (2) .ocx update affects all app usage.
> (3) in-project is not neatly in project list if the UC uses classes
>and modules.
> (4) in-project won't break another app when UC code is
>"fixed/revised".
>


I would also add to #3 that it is too easy to add project-specific
dependencies to a UC making it even more complicated to split out the
code should one chose to later package the UC into a free-standing
OCX.

But what I find disturbing about your list is #2 and #3. Neither of
these conditions need ever happen.

The first rule of COM is that a published interface is chiseled in
stone. If you change the interface then you have a new object. Obey
that rule and you will avoide "Dll Hell". It is that simple.

For example, Given a situation where two programs (App1 and App2) are
using OCX1.

1) You decide to modify OCX1's interface. Add the new interface to
your OCX. Call it OCX2.

App1 and App2 continue to use OCX1. Any newer Apps can use OCX2. If
you want to use OCX2 in the older apps then you will have to
re-compile, but that is no different that what you would have to do if
you planned on changing an internal UC.

No problem with any installs - you are still shipping the same
component (only its newer).

2) You decide to improve the internal workings of OCX1, ie, the
interface doesn't change.

Open the OCX, making sure to maintain binary compatiblity, make your
changes and recompile the component.

Both App1 and App2 benefit immediately from the changes - no
re-compile is necessary.

No problem with any installs - you are still shipping the same
component (only its newer).

DaveO

12/12/2011 9:48:00 AM

0

What? Why?
Install one OS on C: and another on D: and use a boot menu, I've had dual
boot setups for years, pretty much every operating system comes with a boot
manager to facilitate dual booting. My work PC has Win XP & Win 7, my home
PC has Win XP and Ubuntu.

Windows will alternatively let you have mutiple C: drives but only mount one
at a time. I never tried this method of multiple booting so I've no idea how
well it works.

DaveO.

"BeeJ" <nospam@spamnot.com> wrote in message
news:jc389h$ecg$1@adenine.netfront.net...
> Yikes! too many right ways to do it each with problems.
>
> If I can find a SATA switch then I would install two HDs, one with Win7
> and one with XP and then throw the switch and reboot.
>
> Anybody have a SATA switch?
>
>
>
> --- Posted via news://freenews.netfront.net/ - Complaints to
> news@netfront.net ---


Mike Scirocco

12/16/2011 1:53:00 AM

0

On 12/12/2011 1:48 AM, DaveO wrote:
> What? Why?
> Install one OS on C: and another on D: and use a boot menu, I've had dual
> boot setups for years, pretty much every operating system comes with a boot
> manager to facilitate dual booting. My work PC has Win XP& Win 7, my home
> PC has Win XP and Ubuntu.
<snip>

My m/b comes with a simple built in boot manager, pressing F8 while the
machine boots lets me select the drive to boot from:
C: boots XP
D: dual boots XP/Ubuntu using Grub to determine which OS to load
You might check to see if your m/b supports this.

Mike