Results 1 to 10 of 10

Thread: [HELP PLZ!!] I'm having a little problem setting the default value of a property

Threaded View

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Thumbs down [HELP PLZ!!] I'm having a little problem setting the default value of a property

    ahem, here's the property:

    VB Code:
    1. Private DEFAULT_FONT As Font = New Font ("Arial")
    2.  
    3. <DefaultValue(DEFAULT_FONT)> _
    4. Public Overrides Property Font() As Font
    5.         Get
    6.             Return mFont
    7.         End Get
    8.         Set(ByVal Value As Font)
    9.             mFont = Value
    10.         End Set
    11.     End Property


    It says that DEFAULT_FONT has to be a constant expression, but I cant declare a constant of type font.
    What should I do? I just want to have a default value for the font property
    Last edited by MrPolite; Feb 22nd, 2003 at 12:30 AM.
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

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