Hi Linda,
Thanks for your post. Yes; in some cases the program can capture the
absolute path and in some cases it wasn't. Logging in as my self I was
always able to capture the entire path. I was also able to login under a
less privileged account that our technicians use. However, one of the
engineers I that was intended to be the main user of the software was not
able to get absolute paths. We tried running the application under each of
the three user id’s on my laptop.
The paths might normally look like this:
Absolute path:
c:\Documents and Settings\SomeUser\Desktop\data\FirstFile_2005-06-03.csv
Abbreviated path:
c:\Docume ~\SomeUser\Desktop\data\FirstFil ~.csv
Unfortunately I have not cut and paste this abbreviated path as I don’t have
access to an account that experiences this problem. But I remember it
having ‘~’ making it look like old dos paths before you could exceed 8
character file names. But I don’t believe I counted the characters. The
three machines that I tested this on were all running windows XP. The only
thing different was the user id that was logged in. I figured there must be
some user profile setting that allowed it to abbreviate the paths. Or maybe
there is something in the framework that would allow me to expand the
abbreviated paths? I originally had this problem back in June of 2005 but it
still hasn’t been resolved. I wrote the application using VS2003.
Thanks,
Jeff
"Linda Liu [MSFT]" wrote:
Hi Jeff,
Thank you for posting.
I have performed a test on my machine based on your code in both
VS.NET2003 and VS2005. I put a label on the form to display the paths of
the files being dragged and dropped. When the program is running, I drag
files from Windows Explorer and drop them on the panel in the form. The
label in the form does display the absolute paths of these files. The
results of the two tests in VS.NET2003 and in VS2005 come out to be the
same.
The code in my program is like the following.
Private Sub Panel1_DragDrop(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.DragEventArgs) Handles Panel1.DragDrop
Dim fileList() As String =
CType(e.Data.GetData(DataFormats.FileDrop), String())
' display the path of the first file in the fileList
Me.Label1.Text = fileList(0)
End Sub
You have mentioned that "I noticed (on the same machine) that some user
profiles appear to abbreviate the absolute paths to these files thus
breaking my data loading mechanism. " Do you mean that in some cases the
program can capture the absolute paths of the files and in other cases
can't? Would you please give me a more detailed description on this issue?
Sincerely,
Linda Liu
Microsoft Online Community Support
================================================== ==
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
================================================== ==