Groups | Blog | Home
all groups > vb.net controls > november 2004 >

vb.net controls : OpenFileDialog.DereferenceLinks property does not work?


Yuri O
11/27/2004 8:41:18 PM
Probably i do something wrong but it's not working with my app at all.
Could anyone point me to the possible reason.
Thanks
Yuri

mohamed.mossad NO[at]SPAM egdsc.microsoft.com
11/28/2004 3:24:03 PM
Hi Yuri
May be you need to look at this for more info on how to use the dialog,

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemwindowsformsfolderbrowserdialogclasstopic.asp
otherwise, you need to post more details about the problem so ppl can help.

Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC
Yuri O
11/28/2004 8:46:55 PM
Hi Mohamed
Thanks for reply.
The point is that the OpenFileDialog.DereferenceLinks does not work. It
means that if the property is set to "true" then any links being clicked
(e.g. shortcuts to folders), should proceed with navigation to target but it
is not happening. Instead this LNK file is returning.
In other words this property does not affect anything at all.
I was extremely surprised.
Yuri


"Mohamoss" <mohamed.mossad@egdsc.microsoft.com> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: news:SRJAS5V1EHA.3956@cpmsftngxa10.phx.gbl...
[quoted text, click to view]

mohamed.mossad NO[at]SPAM egdsc.microsoft.com
11/29/2004 1:18:29 PM
Hi Yuri
Actually I did a simple test and it works fine mine with me. I tried
different scenarios like, shortcut to file on the same directory, shortcut
to file on another directory or drive, clicking a link that is in a
shortcut to folder that is another directory. And they all worked fine as I
always got the name of the original file on it location . Here is the
simple code I used

this.openFileDialog1.ShowDialog();
this.openFileDialog1.DereferenceLinks= true; \\ it is already true by
default
MessageBox.Show(this.openFileDialog1.FileNames[0]);\\ get the bath of the
file , not the shortcut.
Would you mind posting a snippet of the code where you have the problem?

Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC
Yuri O
11/29/2004 11:43:41 PM
Dear Mohamed

It is amazing. I understand that it is very simple case and it should
obviously work ...but it does not work to me!? I'm always receiving .lnk
instead of real name of target file. Also if shortcut is referencing of to
folder then i'm getting .lnk instead of opening of folder as well. Oops, i'm
getting mad :-))
I wish to thank you for your help. However I couldn't resolve it with use of
original component. I have a standard build VS 2003 so I do not think that
any misunderstandings may occurs with so simple case.
Let's never mind. I've already used an API method GetOpenFileName and this
works well unlike of original .

Thank you very much again
Yuri
Pi-Sys Labs

"Mohamoss" <mohamed.mossad@egdsc.microsoft.com> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: news:tg740Xh1EHA.768@cpmsftngxa10.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button