【问题标题】:FileUpload Control For DevExpress Windows FormDevExpress Windows 窗体的文件上传控件
【发布时间】:2013-12-14 21:05:36
【问题描述】:

我是 DevExpress WinForms 的新手,谁能告诉我使用 FileUploader 控件的简单方法是什么。 我想从文件对话框中选择图像并将其添加到 PictureEdit。

请帮忙!! 提前致谢。

【问题讨论】:

    标签: c# .net devexpress devexpress-windows-ui


    【解决方案1】:

    很遗憾,Devexpress 不提供文件上传控制 ( See This),因此您只能在代码中使用本机文件上传器。

    一个简单的代码是

        // Create OpenFileDialog
        Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
        dlg.Filter = "image Files|*.jpg";
    
         Nullable<bool> result = dlg.ShowDialog();
         if (result == true)
         {
          this.pictureEdit1.Image = Image.FromFile(dlg.FileName) // Not tested this one
         }
    

    希望对你有帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-21
      • 2013-12-20
      • 1970-01-01
      • 2012-04-12
      相关资源
      最近更新 更多