OpenFileDialog,对话框图标 [英] OpenFileDialog , Dialog Icon

查看:366
本文介绍了OpenFileDialog,对话框图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨是否可以在代码中更改OpenFileDialog的默认图标?



这是我目前编写的代码,但没有' t图标的属性值。这是一个限制还是有一个解决方法,而不必自己创建一个控件。



Hi is it possible to change the default icon of a OpenFileDialog in code?

This is the code that I have written at the moment, but there isn't a property value for the icon. Is this a limitation or is there a workaround without having to create a control myself.

public static FileInfo GetFilePath(string FilterType, string Title, string IntDir)
{
   FileInfo ReturnValue = null;
   using (OpenFileDialog GetFileDialog = new OpenFileDialog())
   {
      GetFileDialog.Filter = FilterType;
      GetFileDialog.InitialDirectory = IntDir;
      GetFileDialog.Title = Title;

      if (GetFileDialog.ShowDialog() == DialogResult.OK)
      {
         ReturnValue = new FileInfo(GetFileDialog.FileName);
      }
   }
   return ReturnValue;
}





谢谢



Thanks

推荐答案

这篇关于OpenFileDialog,对话框图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆