|
-
Feb 11th, 2008, 12:14 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] Path location problem Dir.path
I have problem here.. i have textbox that store path location. It show in the textbox as C:\\ . How I can show in the textbox as C:\ ?
Dir1.Path = Text1.Text
-
Feb 11th, 2008, 04:48 AM
#2
Frenzied Member
Re: Path location problem Dir.path
you post is not clear. Do you want whatever path typed in the textbox to become the path for the Dirlistbox? if so you can use
Code:
Private Sub Text1_Change()
On Error Resume Next
Me.Dir1.Path = Me.Text1.Text
End Sub
Note use of On Error Resume Next is not recommended. I've used it just to show you the usage..
-
Feb 11th, 2008, 06:15 AM
#3
Thread Starter
Frenzied Member
Re: Path location problem Dir.path
Drivelistbox does't change. How to change the drivelistbox?
-
Feb 11th, 2008, 06:27 AM
#4
Frenzied Member
Re: Path location problem Dir.path
 Originally Posted by matrik02
Drivelistbox does't change. How to change the drivelistbox?
change with what???
there are various events under which the changes can be coded to happen (say click, double click, got focus,lost focus etc)
-
Feb 11th, 2008, 07:37 AM
#5
Addicted Member
Re: Path location problem Dir.path
 Originally Posted by matrik02
I have problem here.. i have textbox that store path location. It show in the textbox as C:\\ . How I can show in the textbox as C:\ ?
Dir1.Path = Text1.Text
Matrik02,
Where does this C:\\ come from? If you turn your statement around, Text1.Text = Dir1.Path you will never get a double slash... So where do you get the text displayed in Text1?
Jottum™
XpVistaControls , (transparent) usercontrols for XP, Vista and 7 with W2K legacy support.
-
Feb 11th, 2008, 07:47 AM
#6
Thread Starter
Frenzied Member
Re: Path location problem Dir.path
 Originally Posted by Jottum
Matrik02,
Where does this C:\\ come from? If you turn your statement around, Text1.Text = Dir1.Path you will never get a double slash... So where do you get the text displayed in Text1?
A'a I found it, I have code on this. In the textbox show D:\Project, but why my drivelistbox show C: drive? How to change this to D: ?I only have this code only
Code:
Dir1.Path = Text1.Text
-
Feb 11th, 2008, 07:53 AM
#7
Addicted Member
Re: Path location problem Dir.path
 Originally Posted by matrik02
A'a I found it, I have code on this. In the textbox show D:\Project, but why my drivelistbox show C: drive? How to change this to D: ?I only have this code only
Code:
Dir1.Path = Text1.Text
There's also a Drive listbox, you can use them together;
will get you to the root of the drive you've selected in Drive1
Jottum™
XpVistaControls , (transparent) usercontrols for XP, Vista and 7 with W2K legacy support.
-
Feb 11th, 2008, 08:17 AM
#8
Thread Starter
Frenzied Member
Re: Path location problem Dir.path
I have fix this, here it is
Code:
Private Sub Command1_Click()
Dir1.Path = Text1.Text
Drive1.Drive = Text1.Text
End Sub
Private Sub Form_Load()
Text1.Text = "D:\career"
End Sub
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
|