استخدم FilterIndex
SaveFileDialog1.Filter = "مستند نصى (.txt)|*.txt|ملف ورد (.rtf )|*.rtf"
SaveFileDialog1.Title = "حفظ ملف نصى"
SaveFileDialog1.ShowDialog()
If SaveFileDialog1.FilterIndex = 1 Then
MessageBox.Show("txt")
End If
If SaveFileDialog1.FilterIndex = 2 Then
MessageBox.Show("rtf")
End If
SaveFileDialog1.Filter = "مستند نصى (.txt)|*.txt|ملف ورد (.rtf )|*.rtf"
SaveFileDialog1.Title = "حفظ ملف نصى"
SaveFileDialog1.ShowDialog()
If SaveFileDialog1.FilterIndex = 1 Then
MessageBox.Show("txt")
End If
If SaveFileDialog1.FilterIndex = 2 Then
MessageBox.Show("rtf")
End If
