954,557 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

EditorAttribute error (help meeeeeeeeeee)

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
y2kshane
Light Poster
35 posts since Aug 2010
Reputation Points: 8
Solved Threads: 0
 

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

y2kshane
Light Poster
35 posts since Aug 2010
Reputation Points: 8
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: