C# Beginners Tutorial – 34 – OpenFileDialogs

23
1



Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –

Nguồn:https://wijstaanvooronzegrondrechten.org/

Xem Thêm Bài Viết Khác:https://wijstaanvooronzegrondrechten.org/cong-nghe

23 COMMENTS

  1. string filename2 = System.IO.Path.GetFileName(openFileDialog2.FileName);
    string ext2 = System.IO.Path.GetExtension(openFileDialog2.FileName);
    companyname2 = "company_Two";
    renamefile2 = "File2";
    filename2 = renamefile2 + ext2;

    string path2 = Application.StartupPath.Substring(0, (Application.StartupPath.Length – 10));
    System.IO.File.Copy(openFileDialog2.FileName, path2 + "\Document\" + filename2);
    string J2 = path2 + "\Document\";
    string K2 = path2 + "\Document\" + filename2;

  2. I was playing with the filter and i found out that for All Files is . or just **  using . (the dot) is not actually necessary, you could write like this "PNG Image | *png | BIK….and so on

  3. For those of you who want the file to "Actually" open here:
    OpenFileDialog ofd = new OpenFileDialog();
                ofd.Title = "TheNewBoston";
                ofd.Filter = "Text Document(.txt)|.txt";
                if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    string path = ofd.FileName;
                    System.Diagnostics.Process.Start(path);
                }

  4. pretty good tutorials!! very usefull …. now , can u please do some tutorials about all the prints controls? please 😀 ….thank you

LEAVE A REPLY

Please enter your comment!
Please enter your name here