Results 1 to 2 of 2

Thread: Default Property Why doesn't it work

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2003
    Posts
    263

    Default Property Why doesn't it work

    Hi All

    Been searching the web and this forum for the answer but can't find it.

    I have a custom control, and wish to set some default values when it is dropped on the form. Now i have read loads of web pages on it and they all speak in a sense that it is so simple, so why doesn't this code reset my property when dropped on the form.


    <Description("Min value allowed when using numeric mode")> _
    Public Property MinValue() As Double
    'Minimum value the number box will allow
    Get
    Return mbMinValue
    End Get
    Set(ByVal Value As Double)
    mbMinValue = Value
    End Set
    End Property

    Public Sub ResetMinValue()
    mbMinValue = 20
    End Sub

    Public Function ShouldSerializeMinValue() As Boolean
    Return Not (mbMinValue = 20)
    End Function
    _


    Hope someone can shed some light on this really annoying issue!

    Kind Regards

    Danny

  2. #2
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    I found this article useful. It might help you, if you have not read it yet.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width