2008-08-27 13 views

उत्तर

15
using (OpenFileDialog dlg = new OpenFileDialog()) 
{ 
    dlg.Title = "Select a file"; 
    if (dlg.ShowDialog()== DialogResult.OK) 
    { 
     //do something with dlg.FileName 
    } 
} 
1

मैं उपयोग कहेंगे मानक "फ़ाइल खोलें" संवाद बॉक्स (OpenFileDialog), यह कम नए उपयोगकर्ताओं के लिए डराना बनाता है और एक लगातार यूआई के साथ मदद करता है।

1

बंद करें, रयान, लेकिन आपने संवाद कभी नहीं दिखाया। यह होना चाहिए:

if (dlg.ShowDialog() == DialogResult.OK) 
संबंधित मुद्दे

 संबंधित मुद्दे