im creating a custom User Control. its a custom picture box . i want to user to select the picture file from file system. so i use following code(i found it on a forum) . but vb says that code has a error . help me :'(

<EditorAttribute(GetType(System.Windows.Forms.Design.FileNameEditor), _
    GetType(System.Drawing.Design.UITypeEditor))> _

Error - type 'System.Windows.Forms.Design.FileNameEditor' is not defined


full property code

<Category("Image Path")> _
    <Browsable(True)> _
   <EditorAttribute(GetType(System.Windows.Forms.Design.FileNameEditor), _
    GetType(System.Drawing.Design.UITypeEditor))> _
    Public Property file_D() As String
        Get

            Return path
        End Get
        Set(ByVal value As String)
            path = value


            If String.IsNullOrEmpty(path) Then

                PictureBox1.ImageLocation = path

            End If

            Me.Invalidate()
        End Set
    End Property

Edited 5 Years Ago by y2kshane: n/a

i found the answer
i forget to include System.Design to my project reference :)

This question has already been answered. Start a new discussion instead.