473,383 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

VB 6.0 Cntrls In VBE - 'DriveListBox', 'DirListBox' & 'FileListBox

Guyz,

I have just learnt how to add the 'DriveListBox', 'DirListBox' and
'FileListBox' controls that were always included in the toolbox with VB 3.0 /
4.0 / 5.0, but always missing in VBE 2005.

And I have managed to create a simple file browsing project with the
'DriveListBox',
'DirListBox' and 'FileListBox' controls with the following code on the
'Form1' form:-

Private Sub CmdExit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles CmdExit.Click
REM Exiting the program whenever the user clicks on the
REM 'Exit' button. Added on Tuesday 23rd January 2007.

REM Exiting the program. Added on Tuesday 23rd January
REM 2007.
End

End Sub

Private Sub Drives_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs)
REM Update the 'Path' property of the 'Directories' directory list
REM box whenever the user clicks on a drive listed in the 'Drives'
REM drive list box. Added on Tuesday 23rd January 2007.

REM Setting the 'Path' property of the 'Directories' directory list
REM box. Added on Tuesday 23rd January 2007.
Directories.Path = Convert.ToString(Drives.SelectedItem)

End Sub

Private Sub Directories_Change(ByVal sender As Object, ByVal e As
System.EventArgs)
REM Update the 'Path' property of the 'Files' file list box whenever
REM the user clicks on a directory listed in the 'Directories'
directory
REM list box. Added on Tuesday 23rd January 2007.

REM Updating the 'Path' property of the 'Files' file list box.
REM Added on Tuesday 23rd January 2007.
Files.Path = Directories.Path

End Sub

Remember that I am using Visual Basic Express 2005. When I run the program,
the code works. Selecting a drive letter in the 'Drives' DriveListBox
control changes
what is displayed in the 'Directories' DirListBox control which in turn
changes what is displayed in the 'Files' FileListBox' control.

Likewise, selecting a directory in the 'Directories' DirListBox' control
changes what is displayed in the 'Files' FileListBox control.

The sample project allows you to browse all local directories on your
computer and all remote directories on another computer.

The problem is that when I try to copy the controls and drop them into a
GroupBox control (which used to be the Frame control in VB 3.0 / 4.0 / 5.0)
and the same
program code are also copied, with the new controls being named 'Drives2',
'Directories2' and 'Files2'.

What happens when I try to run the project, is that the code for the
'Drives2',
'Directories2' and 'Files2' controls in the GroupBox control no longer works
whereas
the code for the 'Drives', 'Directories' and 'Files' controls outside the
GroupBox control do work.

i.e. clicking on a drive letter in the 'Drives' control outside the GroupBox
control updates the contents of the 'Directories' and 'Files' controls, but
clicking on a drive letter in the 'Drives2' control inside the GroupBox
control does not update the contents of the 'Directories2' and 'Files2'
controls.

What is missing? Where am I going wrong? How can I fix this problem?

I have been using VB 5.0 for nearly 10 years, and I have just recently
started exploring VBE 2005 after installing it last May.

Any help / advice would be most appreciated. Thanks in advance.
Jan 26 '07 #1
9 4418
Blimey!

I haven't seen people use REM statemennts in VB for many years, but I have
in batch files when I write them sometimes. What's wrong with using '
Scanboy? Example:

' This is a comment
Application.Exit() ' The preceding code executes

Try not to use 'End' in .NET Scanboy because as you know it stops execution
at that point at is a harsh way of closing your app.

Sorry, but I don't have the time to improve your code, but I started with VB
3 too... In the days where the VB application itself was just about 3 MB in
total.

Newbie Coder
(It's just a name)
Jan 26 '07 #2

"Scanboy" <Sc*****@discussions.microsoft.comwrote in message
news:38**********************************@microsof t.com...
Guyz,

I have just learnt how to add the 'DriveListBox', 'DirListBox' and
'FileListBox' controls that were always included in the toolbox with VB
3.0 /
4.0 / 5.0, but always missing in VBE 2005.

And I have managed to create a simple file browsing project with the
'DriveListBox',
'DirListBox' and 'FileListBox' controls with the following code on the
'Form1' form:-

Private Sub CmdExit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles CmdExit.Click
REM Exiting the program whenever the user clicks on the
REM 'Exit' button. Added on Tuesday 23rd January 2007.

REM Exiting the program. Added on Tuesday 23rd January
REM 2007.
End

End Sub

Private Sub Drives_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs)
REM Update the 'Path' property of the 'Directories' directory list
REM box whenever the user clicks on a drive listed in the 'Drives'
REM drive list box. Added on Tuesday 23rd January 2007.

REM Setting the 'Path' property of the 'Directories' directory list
REM box. Added on Tuesday 23rd January 2007.
Directories.Path = Convert.ToString(Drives.SelectedItem)

End Sub

Private Sub Directories_Change(ByVal sender As Object, ByVal e As
System.EventArgs)
REM Update the 'Path' property of the 'Files' file list box
whenever
REM the user clicks on a directory listed in the 'Directories'
directory
REM list box. Added on Tuesday 23rd January 2007.

REM Updating the 'Path' property of the 'Files' file list box.
REM Added on Tuesday 23rd January 2007.
Files.Path = Directories.Path

End Sub

Remember that I am using Visual Basic Express 2005. When I run the
program,
the code works. Selecting a drive letter in the 'Drives' DriveListBox
control changes
what is displayed in the 'Directories' DirListBox control which in turn
changes what is displayed in the 'Files' FileListBox' control.

Likewise, selecting a directory in the 'Directories' DirListBox' control
changes what is displayed in the 'Files' FileListBox control.

The sample project allows you to browse all local directories on your
computer and all remote directories on another computer.

The problem is that when I try to copy the controls and drop them into a
GroupBox control (which used to be the Frame control in VB 3.0 / 4.0 /
5.0)
and the same
program code are also copied, with the new controls being named 'Drives2',
'Directories2' and 'Files2'.

What happens when I try to run the project, is that the code for the
'Drives2',
'Directories2' and 'Files2' controls in the GroupBox control no longer
works
whereas
the code for the 'Drives', 'Directories' and 'Files' controls outside the
GroupBox control do work.

i.e. clicking on a drive letter in the 'Drives' control outside the
GroupBox
control updates the contents of the 'Directories' and 'Files' controls,
but
clicking on a drive letter in the 'Drives2' control inside the GroupBox
control does not update the contents of the 'Directories2' and 'Files2'
controls.

What is missing? Where am I going wrong? How can I fix this problem?

I have been using VB 5.0 for nearly 10 years, and I have just recently
started exploring VBE 2005 after installing it last May.

Any help / advice would be most appreciated. Thanks in advance.

Apparently you multi-posted this to numerous news groups. I believe it was
answered in the classic vb groups.

If you had cross-posted, all groups would have seen the answer and you
wouldn't have to go look for it.

Galen
Jan 26 '07 #3


"Scanboy" wrote:
Guyz,

I have just learnt how to add the 'DriveListBox', 'DirListBox' and
'FileListBox' controls that were always included in the toolbox with VB 3.0 /
4.0 / 5.0, but always missing in VBE 2005.

And I have managed to create a simple file browsing project with the
'DriveListBox',
'DirListBox' and 'FileListBox' controls with the following code on the
'Form1' form:-

Private Sub CmdExit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles CmdExit.Click
REM Exiting the program whenever the user clicks on the
REM 'Exit' button. Added on Tuesday 23rd January 2007.

REM Exiting the program. Added on Tuesday 23rd January
REM 2007.
End

End Sub

Private Sub Drives_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs)
REM Update the 'Path' property of the 'Directories' directory list
REM box whenever the user clicks on a drive listed in the 'Drives'
REM drive list box. Added on Tuesday 23rd January 2007.

REM Setting the 'Path' property of the 'Directories' directory list
REM box. Added on Tuesday 23rd January 2007.
Directories.Path = Convert.ToString(Drives.SelectedItem)

End Sub

Private Sub Directories_Change(ByVal sender As Object, ByVal e As
System.EventArgs)
REM Update the 'Path' property of the 'Files' file list box whenever
REM the user clicks on a directory listed in the 'Directories'
directory
REM list box. Added on Tuesday 23rd January 2007.

REM Updating the 'Path' property of the 'Files' file list box.
REM Added on Tuesday 23rd January 2007.
Files.Path = Directories.Path

End Sub

Remember that I am using Visual Basic Express 2005. When I run the program,
the code works. Selecting a drive letter in the 'Drives' DriveListBox
control changes
what is displayed in the 'Directories' DirListBox control which in turn
changes what is displayed in the 'Files' FileListBox' control.

Likewise, selecting a directory in the 'Directories' DirListBox' control
changes what is displayed in the 'Files' FileListBox control.

The sample project allows you to browse all local directories on your
computer and all remote directories on another computer.

The problem is that when I try to copy the controls and drop them into a
GroupBox control (which used to be the Frame control in VB 3.0 / 4.0 / 5.0)
and the same
program code are also copied, with the new controls being named 'Drives2',
'Directories2' and 'Files2'.

What happens when I try to run the project, is that the code for the
'Drives2',
'Directories2' and 'Files2' controls in the GroupBox control no longer works
whereas
the code for the 'Drives', 'Directories' and 'Files' controls outside the
GroupBox control do work.

i.e. clicking on a drive letter in the 'Drives' control outside the GroupBox
control updates the contents of the 'Directories' and 'Files' controls, but
clicking on a drive letter in the 'Drives2' control inside the GroupBox
control does not update the contents of the 'Directories2' and 'Files2'
controls.

What is missing? Where am I going wrong? How can I fix this problem?

I have been using VB 5.0 for nearly 10 years, and I have just recently
started exploring VBE 2005 after installing it last May.

Any help / advice would be most appreciated. Thanks in advance.


The work-around is this:-

1. Drop a label control on the form.

2. Set the 'AutoSize' property of the label control to FALSE.

3. Set the 'BorderStyle' property of the label control to 'Fixed3D'.

4. Make the 'Text' property of the label control an empty string.

5. Then position the 'Drives', 'Directories' and 'Files' controls so
that they appear to be inside the label. Resize the label if
necessary to accomodate the controls.

6. If you want the label's border around the 'Drives', 'Directories'
and 'Files' controls to have a title, drag another label control onto
top of the first label control and position the second label control
over the first label control so that the border around the 'Drives',
'Directories' and 'Files' controls appears to have a title, in a similar
fashion to the Frame control in VB 3.0 / 4.0 / 5.0.

7. Set the 'Text' property of the second label control to whatever
you like.

8. When you run the project, all you see is what appears to be a 3D
border around the drives, directories and files, with a title.

Nobody is any wiser, but only you know different.

Jan 26 '07 #4
Newbie Coder,

I am from the old school of programming. I believe in REM, WHILE ... WEND,
FOR ... NEXT, DO ... LOOP, etc., instead of symbols and abbreviations.

I am new to VB .NET development. What's the difference between 'End' and
'Application.Exit()'?
SB
----------------------------------------------------------------------------------------
"Newbie Coder" wrote:
Blimey!

I haven't seen people use REM statemennts in VB for many years, but I have
in batch files when I write them sometimes. What's wrong with using '
Scanboy? Example:

' This is a comment
Application.Exit() ' The preceding code executes

Try not to use 'End' in .NET Scanboy because as you know it stops execution
at that point at is a harsh way of closing your app.

Sorry, but I don't have the time to improve your code, but I started with VB
3 too... In the days where the VB application itself was just about 3 MB in
total.

Newbie Coder
(It's just a name)
Jan 26 '07 #5
Galen,

I am not a regular on these ngs. Didn't know what ngs are out there,
so I just looked for ones that I thought were appropiate for my posts.

Besides, I am using mum's computer, which does not have a newsreader
installed whereas I have Newsrover installed on mine, so I am replying to
this via Microsoft's online web-based Usenet browser.
SB
-----------------------------------------------------------------------------------
"Galen Somerville" wrote:
>
"Scanboy" <Sc*****@discussions.microsoft.comwrote in message
news:38**********************************@microsof t.com...
Guyz,

I have just learnt how to add the 'DriveListBox', 'DirListBox' and
'FileListBox' controls that were always included in the toolbox with VB
3.0 /
4.0 / 5.0, but always missing in VBE 2005.

And I have managed to create a simple file browsing project with the
'DriveListBox',
'DirListBox' and 'FileListBox' controls with the following code on the
'Form1' form:-

Private Sub CmdExit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles CmdExit.Click
REM Exiting the program whenever the user clicks on the
REM 'Exit' button. Added on Tuesday 23rd January 2007.

REM Exiting the program. Added on Tuesday 23rd January
REM 2007.
End

End Sub

Private Sub Drives_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs)
REM Update the 'Path' property of the 'Directories' directory list
REM box whenever the user clicks on a drive listed in the 'Drives'
REM drive list box. Added on Tuesday 23rd January 2007.

REM Setting the 'Path' property of the 'Directories' directory list
REM box. Added on Tuesday 23rd January 2007.
Directories.Path = Convert.ToString(Drives.SelectedItem)

End Sub

Private Sub Directories_Change(ByVal sender As Object, ByVal e As
System.EventArgs)
REM Update the 'Path' property of the 'Files' file list box
whenever
REM the user clicks on a directory listed in the 'Directories'
directory
REM list box. Added on Tuesday 23rd January 2007.

REM Updating the 'Path' property of the 'Files' file list box.
REM Added on Tuesday 23rd January 2007.
Files.Path = Directories.Path

End Sub

Remember that I am using Visual Basic Express 2005. When I run the
program,
the code works. Selecting a drive letter in the 'Drives' DriveListBox
control changes
what is displayed in the 'Directories' DirListBox control which in turn
changes what is displayed in the 'Files' FileListBox' control.

Likewise, selecting a directory in the 'Directories' DirListBox' control
changes what is displayed in the 'Files' FileListBox control.

The sample project allows you to browse all local directories on your
computer and all remote directories on another computer.

The problem is that when I try to copy the controls and drop them into a
GroupBox control (which used to be the Frame control in VB 3.0 / 4.0 /
5.0)
and the same
program code are also copied, with the new controls being named 'Drives2',
'Directories2' and 'Files2'.

What happens when I try to run the project, is that the code for the
'Drives2',
'Directories2' and 'Files2' controls in the GroupBox control no longer
works
whereas
the code for the 'Drives', 'Directories' and 'Files' controls outside the
GroupBox control do work.

i.e. clicking on a drive letter in the 'Drives' control outside the
GroupBox
control updates the contents of the 'Directories' and 'Files' controls,
but
clicking on a drive letter in the 'Drives2' control inside the GroupBox
control does not update the contents of the 'Directories2' and 'Files2'
controls.

What is missing? Where am I going wrong? How can I fix this problem?

I have been using VB 5.0 for nearly 10 years, and I have just recently
started exploring VBE 2005 after installing it last May.

Any help / advice would be most appreciated. Thanks in advance.
Apparently you multi-posted this to numerous news groups. I believe it was
answered in the classic vb groups.

If you had cross-posted, all groups would have seen the answer and you
wouldn't have to go look for it.

Galen
Jan 26 '07 #6
Galen,

I assume it was multiposted because I don't see the other posts in this
newsgroup.

Multiposters is wrong and should not get answers. While crossposting is very
handy because sometimes 2 persons can answer one problem, that they could
not do alone.

Cor

"Galen Somerville" <ga***@community.nospamschreef in bericht
news:O8**************@TK2MSFTNGP02.phx.gbl...
>
"Scanboy" <Sc*****@discussions.microsoft.comwrote in message
news:38**********************************@microsof t.com...
>Guyz,

I have just learnt how to add the 'DriveListBox', 'DirListBox' and
'FileListBox' controls that were always included in the toolbox with VB
3.0 /
4.0 / 5.0, but always missing in VBE 2005.

And I have managed to create a simple file browsing project with the
'DriveListBox',
'DirListBox' and 'FileListBox' controls with the following code on the
'Form1' form:-

Private Sub CmdExit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles CmdExit.Click
REM Exiting the program whenever the user clicks on the
REM 'Exit' button. Added on Tuesday 23rd January 2007.

REM Exiting the program. Added on Tuesday 23rd January
REM 2007.
End

End Sub

Private Sub Drives_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs)
REM Update the 'Path' property of the 'Directories' directory list
REM box whenever the user clicks on a drive listed in the 'Drives'
REM drive list box. Added on Tuesday 23rd January 2007.

REM Setting the 'Path' property of the 'Directories' directory
list
REM box. Added on Tuesday 23rd January 2007.
Directories.Path = Convert.ToString(Drives.SelectedItem)

End Sub

Private Sub Directories_Change(ByVal sender As Object, ByVal e As
System.EventArgs)
REM Update the 'Path' property of the 'Files' file list box
whenever
REM the user clicks on a directory listed in the 'Directories'
directory
REM list box. Added on Tuesday 23rd January 2007.

REM Updating the 'Path' property of the 'Files' file list box.
REM Added on Tuesday 23rd January 2007.
Files.Path = Directories.Path

End Sub

Remember that I am using Visual Basic Express 2005. When I run the
program,
the code works. Selecting a drive letter in the 'Drives' DriveListBox
control changes
what is displayed in the 'Directories' DirListBox control which in turn
changes what is displayed in the 'Files' FileListBox' control.

Likewise, selecting a directory in the 'Directories' DirListBox' control
changes what is displayed in the 'Files' FileListBox control.

The sample project allows you to browse all local directories on your
computer and all remote directories on another computer.

The problem is that when I try to copy the controls and drop them into a
GroupBox control (which used to be the Frame control in VB 3.0 / 4.0 /
5.0)
and the same
program code are also copied, with the new controls being named
'Drives2',
'Directories2' and 'Files2'.

What happens when I try to run the project, is that the code for the
'Drives2',
'Directories2' and 'Files2' controls in the GroupBox control no longer
works
whereas
the code for the 'Drives', 'Directories' and 'Files' controls outside the
GroupBox control do work.

i.e. clicking on a drive letter in the 'Drives' control outside the
GroupBox
control updates the contents of the 'Directories' and 'Files' controls,
but
clicking on a drive letter in the 'Drives2' control inside the GroupBox
control does not update the contents of the 'Directories2' and 'Files2'
controls.

What is missing? Where am I going wrong? How can I fix this problem?

I have been using VB 5.0 for nearly 10 years, and I have just recently
started exploring VBE 2005 after installing it last May.

Any help / advice would be most appreciated. Thanks in advance.

Apparently you multi-posted this to numerous news groups. I believe it was
answered in the classic vb groups.

If you had cross-posted, all groups would have seen the answer and you
wouldn't have to go look for it.

Galen


Jan 26 '07 #7
:-)
Even in VB classic i used ' instead of REM Rem is from pre GUI times basic
( C64 , Qbasic ,,,, )

End should never be used in a GUI or controls app it is only usable in a
code only project ( like a project in VB6 that only contains modules ) in
all other situations it is a ticking time bomb , as it unconditionally
inmediatly terminates the app

regrds

Michel
"Newbie Coder" <ne**********@pleasespamme.comschreef in bericht
news:uY**************@TK2MSFTNGP04.phx.gbl...
Blimey!

I haven't seen people use REM statemennts in VB for many years, but I have
in batch files when I write them sometimes. What's wrong with using '
Scanboy? Example:

' This is a comment
Application.Exit() ' The preceding code executes

Try not to use 'End' in .NET Scanboy because as you know it stops
execution
at that point at is a harsh way of closing your app.

Sorry, but I don't have the time to improve your code, but I started with
VB
3 too... In the days where the VB application itself was just about 3 MB
in
total.

Newbie Coder
(It's just a name)


Jan 26 '07 #8
You may be from the old school of programming, but you should think of
..Net as an opportunity to join the new school of programming. They'll
probably remove While/Wend in the next version (if they haven't
already).
For/Next and Do/Loop are still used, by the way.

Good luck.

Robin S.
--------------------------------
"Scanboy" <Sc*****@discussions.microsoft.comwrote in message
news:38**********************************@microsof t.com...
Newbie Coder,

I am from the old school of programming. I believe in REM, WHILE ...
WEND,
FOR ... NEXT, DO ... LOOP, etc., instead of symbols and abbreviations.

I am new to VB .NET development. What's the difference between 'End'
and
'Application.Exit()'?
SB
----------------------------------------------------------------------------------------
"Newbie Coder" wrote:
>Blimey!

I haven't seen people use REM statemennts in VB for many years, but I
have
in batch files when I write them sometimes. What's wrong with using '
Scanboy? Example:

' This is a comment
Application.Exit() ' The preceding code executes

Try not to use 'End' in .NET Scanboy because as you know it stops
execution
at that point at is a harsh way of closing your app.

Sorry, but I don't have the time to improve your code, but I started
with VB
3 too... In the days where the VB application itself was just about 3
MB in
total.

Newbie Coder
(It's just a name)

Jan 26 '07 #9
Guyz,

This is the Scanboy here again.

I have just had a "D'oh!" moment here.

I have been a bit stupid. The problem is with (the following are all on one
line):-

Private Sub Drives_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs)

and:-

Private Sub Directories_Change(ByVal sender As Object, ByVal e As
System.EventArgs)

All I needed to do was to add:-

Private Sub Drives_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Drives.SelectedIndexChanged

Private Sub Directories_Change(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Directories.Change

which fixed the problem. I am at a loss as to how and why the 'Handles'
part somehow got left off.
SB
------------------------------------------------------------------------------------------------
"Scanboy" wrote:
>

"Scanboy" wrote:
Guyz,

I have just learnt how to add the 'DriveListBox', 'DirListBox' and
'FileListBox' controls that were always included in the toolbox with VB 3.0 /
4.0 / 5.0, but always missing in VBE 2005.

And I have managed to create a simple file browsing project with the
'DriveListBox',
'DirListBox' and 'FileListBox' controls with the following code on the
'Form1' form:-

Private Sub CmdExit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles CmdExit.Click
REM Exiting the program whenever the user clicks on the
REM 'Exit' button. Added on Tuesday 23rd January 2007.

REM Exiting the program. Added on Tuesday 23rd January
REM 2007.
End

End Sub

Private Sub Drives_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs)
REM Update the 'Path' property of the 'Directories' directory list
REM box whenever the user clicks on a drive listed in the 'Drives'
REM drive list box. Added on Tuesday 23rd January 2007.

REM Setting the 'Path' property of the 'Directories' directory list
REM box. Added on Tuesday 23rd January 2007.
Directories.Path = Convert.ToString(Drives.SelectedItem)

End Sub

Private Sub Directories_Change(ByVal sender As Object, ByVal e As
System.EventArgs)
REM Update the 'Path' property of the 'Files' file list box whenever
REM the user clicks on a directory listed in the 'Directories'
directory
REM list box. Added on Tuesday 23rd January 2007.

REM Updating the 'Path' property of the 'Files' file list box.
REM Added on Tuesday 23rd January 2007.
Files.Path = Directories.Path

End Sub

Remember that I am using Visual Basic Express 2005. When I run the program,
the code works. Selecting a drive letter in the 'Drives' DriveListBox
control changes
what is displayed in the 'Directories' DirListBox control which in turn
changes what is displayed in the 'Files' FileListBox' control.

Likewise, selecting a directory in the 'Directories' DirListBox' control
changes what is displayed in the 'Files' FileListBox control.

The sample project allows you to browse all local directories on your
computer and all remote directories on another computer.

The problem is that when I try to copy the controls and drop them into a
GroupBox control (which used to be the Frame control in VB 3.0 / 4.0 / 5.0)
and the same
program code are also copied, with the new controls being named 'Drives2',
'Directories2' and 'Files2'.

What happens when I try to run the project, is that the code for the
'Drives2',
'Directories2' and 'Files2' controls in the GroupBox control no longer works
whereas
the code for the 'Drives', 'Directories' and 'Files' controls outside the
GroupBox control do work.

i.e. clicking on a drive letter in the 'Drives' control outside the GroupBox
control updates the contents of the 'Directories' and 'Files' controls, but
clicking on a drive letter in the 'Drives2' control inside the GroupBox
control does not update the contents of the 'Directories2' and 'Files2'
controls.

What is missing? Where am I going wrong? How can I fix this problem?

I have been using VB 5.0 for nearly 10 years, and I have just recently
started exploring VBE 2005 after installing it last May.

Any help / advice would be most appreciated. Thanks in advance.


The work-around is this:-

1. Drop a label control on the form.

2. Set the 'AutoSize' property of the label control to FALSE.

3. Set the 'BorderStyle' property of the label control to 'Fixed3D'.

4. Make the 'Text' property of the label control an empty string.

5. Then position the 'Drives', 'Directories' and 'Files' controls so
that they appear to be inside the label. Resize the label if
necessary to accomodate the controls.

6. If you want the label's border around the 'Drives', 'Directories'
and 'Files' controls to have a title, drag another label control onto
top of the first label control and position the second label control
over the first label control so that the border around the 'Drives',
'Directories' and 'Files' controls appears to have a title, in a similar
fashion to the Frame control in VB 3.0 / 4.0 / 5.0.

7. Set the 'Text' property of the second label control to whatever
you like.

8. When you run the project, all you see is what appears to be a 3D
border around the drives, directories and files, with a title.

Nobody is any wiser, but only you know different.
Jan 27 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Martin | last post by:
Again drawing on the groups experience:- 1. For general file opening and file saving, using VB6, are there any issues with using the FileOpen and FileSave Common Dialog Boxes? 2. Is using the...
3
by: Mrkrich | last post by:
In VB.NET it doesn't have DirListBox control, I want to retrieve the directory name so I try to use OpenFileDialog/SaveFileDialog and like I guess it retrieve the file name not directory. Does in...
1
by: Vernon Gainous | last post by:
Does VB.NET have it's own set of controls for accessing the file system. VB6 had a DriveListBox, DirListBox, and FileListBox controls. Where are these controls for VB.NET?
10
by: kokirichild | last post by:
Hi All! I've been scouring the web to no avail, but what I'm looking for is something similar to the FileListBox that was there in VB6 but seems to have been removed (or moved) in 2005. Does...
0
by: akoymakoy | last post by:
how do i link my dirlistbox to the filelistbox viceversa... I would like to use the path of the file selected in the filelistbox as a variable that i would use as a location for the DB that i will...
7
by: =?Utf-8?B?U2NhbmJveQ==?= | last post by:
Guyz, I have just learnt how to add the 'DriveListBox', 'DirListBox' and 'FileListBox' controls that were always included in the toolbox with VB 3.0 / 4.0 / 5.0, but always missing in VBE 2005....
0
by: supriya123 | last post by:
Hi, I have one c# windows application in which I am using a DirListBox control.Its working finely but I am not getting a way for retrieving the elements of the control. Like - If I want some ith...
0
by: Cancionero | last post by:
All, This is a simple problem that I, for some reason, am having a hard time with. Basically I am trying to rename all the files listed in a FileListBox based on a search and replace string. I...
2
by: VEnkatramasamy | last post by:
Hi, I am working in a upgradation of a VB project. I am reported with an issue that a drivelistbox does not show the mapped drives (it works properly on other operating systems except windows...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.