2017-07-19 9 views
1
vb.netで

を選択することはできません、私は(PDFファイルや画像ファイル)を選択してご覧ください簡単な方法を作成し、私はfileopendialog を使用し、これは私のコードですvb.net私はpdfファイル

Private Sub btn_parcour_Click(sender As Object, e As EventArgs) Handles btn_parcour.Click 
    fichier.Filter = "PDF Files |* .pdf " 
    If fichier.ShowDialog = DialogResult.OK Then 
     fichier_txt.Text = fichier.FileName 
    End If 
End Sub 

しかし、私は、ファイルを選択するためのファイルダイアログを開いたときのメッセージは、あなたがこの

enter image description here

+0

を行う場合は、アスタリスクの後にスペースを削除します。 –

+0

同じ結果 –

+0

とアスタリスクの後のスペースとパイプシンボルの前のスペース –

答えて

1

画面でファイル

を持っていないです、ので、私はそれを行うことはできませんフィルターのスペースが多すぎます。それはパターンマッチングを捨てます。例えば

'Remove all the extra spaces 
fichier.Filter = "PDF Files|*.pdf" 

PDFおよび他のすべてのファイル

'Note no stray spaces where they are not needed 
fichier.Filter = "PDF Files|*.pdf|All files(*.*)|*.*" 
関連する問題