The answer is from the MSDN forums
Out of the box the OpenFileDialog is not able to do that.
A reason might be, that .lnk files could be used by a user, to navigate to a different folder, where he/she expects the file, that needs to be opened.
In the above posted link the user 'Ryan' posted a snippet, to exclude selected .lnk files in the FileOK event.
Again, not my code! But since some websites move their content and a link might not work any longer, here 'Ryan's' code snippet (written in VB):
Public Class Home
Private WithEvents _fileDialog As New OpenFileDialog
Private Sub BrowseButton1_Click(sender As Object, e As EventArgs) Handles BrowseButton1.Click
With Me._fileDialog
.DereferenceLinks = True ' this allows the FileName property to have the Target of a shortcut link, instead of the shortcut link file name
.Multiselect = False
.Filter = "CSV (Comma delimited) (*.csv)|*.csv"
.ShowDialog()
End With
End Sub
Private Sub _fileDialog_FileOk(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles _fileDialog.FileOk
If Not Me._fileDialog.FileName Like "*.csv" Then
' cancel any shortcut files here
e.Cancel = True
MsgBox("You must select a CSV (Comma delimited) file.", MsgBoxStyle.Exclamation)
Else
Me.TextBox1.Text = Me._fileDialog.FileName
End If
End Sub
End Class
.lnkto navigate to another folder. - nilsK