OpenFileDialog and .lnk .url files


J

jonpb

Hi,
Is there some way to force the OpenFileDialog NOT to display shortcuts
like .lnk and .url files when I have specified a filter, for instance:
"DWG files|*.dwg|DXF files|*.dxf"

Thanks
 
Ad

Advertisements

J

Jeff Johnson

Is there some way to force the OpenFileDialog NOT to display shortcuts
like .lnk and .url files when I have specified a filter, for instance:
"DWG files|*.dwg|DXF files|*.dxf"
Just a guess, but try setting the DereferenceLinks property to false.
 
J

jonpb

Jeff said:
Just a guess, but try setting the DereferenceLinks property to false.
Nope. Just another quick question, is this supposed to be a "feature"?
If so, could someone explain it to me.
 
Ad

Advertisements

J

Jeff Johnson

Nope. Just another quick question, is this supposed to be a "feature"? If
so, could someone explain it to me.
What if you were developing a program to examine the guts of .lnk files
(shortcuts)? You'd want to actually open THAT file, but the default behavior
of the common dialogs is to FOLLOW the shortcut to its target, not open the
physical .lnk file. This property allows you to turn off this default
behavior.

Wait, maybe that wasn't the question you were asking. If you were asking
about why you still see shortcuts when you specify a filter, I'd say yes,
because the shortcuts COULD point to one of the files in your filter. It's
the same concept behind continuing to display folders, because one of those
types of files might be in a subfolder.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

OpenFileDialog 1
OpenFileDialog 1
openFileDialog 8
UIPAB - OpenFileDialog 0
OpenFileDialog Filter 1
OpenFileDialog bug ? 0
OpenFileDialog filename 2
Selecting both files and directories with OpenFileDialog? 0

Top