如何将文件夹浏览器添加到C#表单中 [英] How to add folder browser into the C# form

查看:86
本文介绍了如何将文件夹浏览器添加到C#表单中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有文件夹浏览器对话,但是当我运行它时,我在屏幕上获得了对话视图,但我无法获得其在系统托盘上的图标。

我想让它像c#form一样实现这个我想把它添加到Form中。





我怎样才能实现这种行为。



问候,

Bhushan Lahane



我尝试过:



I have Folder Browser Dialogue but when I run It I get Dialogue view on screen but I am not able to get its Icon On system Tray.
I want to make it work like c# form to achieve this I want add it into Form.


How can i achieve this behavior.

Regards,
Bhushan Lahane

What I have tried:

Form dummyForm = new Form() { ShowInTaskbar = true, ShowIcon = true, WindowState = FormWindowState.Minimized, TopMost = true };

FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog()
DialogResult.OK == folderBrowserDialog.ShowDialog(dummyForm)

这里我在文件夹浏览器中添加了一个表单,但我想在c#form中添加此文件夹浏览器

Here I added one form inside Folder browser but i want to add this folder browser inside c# form

推荐答案

那是因为 FolderBrowserDialog 不是您的程序,但Windows功能。

您可以使用此处的自定义对话框: Ookii.Dialogs - Ookii.org [ ^ ]

否则你可以编写自己的FolderBrowserDialog版本:)
That's because FolderBrowserDialog is not part of your program, but a Windows function.
You might use the custom dialogs from here: Ookii.Dialogs - Ookii.org[^]
Otherwise you could write your own version of FolderBrowserDialog :)


这篇关于如何将文件夹浏览器添加到C#表单中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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