Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Visual Basic Problem

  • 13-02-2007 11:45pm
    #1
    Registered Users, Registered Users 2 Posts: 1,559 ✭✭✭


    Please Help me with this errors problem

    Ive created a class which supposed to change the height of a picturebox on a form but it wont work cos I get these errors

    Error 2 Value of type 'Integer' cannot be converted to '1-dimensional array of Integer'.

    Error 3 'Set' parameter must have the same type as the containing property.

    It has problems with return intHeight
    and Value in Set(ByVal Value as integer)
    This is the code I used


    Public Class changeHeightWidth
    Private intHeight As Integer

    Public Property ChangeHeight() As Integer()
    Get
    Return intHeight
    End Get


    Set(ByVal Value As Integer)
    intHeight = Value
    End Set

    End Property
    End Class


Comments

  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    
    Public Class changeHeightWidth
    Private intHeight As Integer
    
    [b]Public Property ChangeHeight() As Integer[/b]
    Get
    Return intHeight
    End Get
    
    
    Set(ByVal Value As Integer)
    intHeight = Value
    End Set
    
    End Property
    End Class
    

    Public Property ChangeHeight() As Integer() is declaring the property as an array. I've removed the parentheses in the code above - that should fix it for you.


  • Registered Users, Registered Users 2 Posts: 1,559 ✭✭✭quinnd6


    Brill thanks


Advertisement