【发布时间】:2023-03-26 19:50:01
【问题描述】:
我正在创建一个 userControl,并希望它有一个可以在设计时使用 openFileDialog 填充的字符串属性。
你知道,在 Visual Studio 属性文本框旁边有那些小“...”,以便在需要时可以浏览到文件。
我不知道如何实现这一点。我感谢您的帮助。
【问题讨论】:
-
您能否更具体地说明您尝试过的内容等?
-
Anthony,我不知道如何在此处正确插入代码 sn-p... 我尝试了以下方法: Private ofd As Windows.Forms.OpenFileDialog Public Property SomeString() As Windows .Forms.OpenFileDialog Get Return ofd End Get Set(ByVal value As Windows.Forms.OpenFileDialog) ofd = value End Set End Property 我也试过 IO.File 而不是 OpenFileDialog
标签: vb.net properties openfiledialog