0

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 by y2kshane: n/a

1
Contributor
1
Reply
3
Views
5 Years
Discussion Span
Last Post by y2kshane
0

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.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.