Results 1 to 6 of 6

Thread: OCX's

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    you know how ocx's have ocx1.something

    how do I make my own something, like

    ocx1.backcolor = vbblue

    how can I get my own stuff to some up after the . and work
    NXSupport - Your one-stop source for computer help

  2. #2
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    Use the property Get/Set/Let statements

    Code:
    Private lMaxValue As Long
    
    Property Get MaxValue() As Long
        'return the max value of the bar
        MaxValue = lMaxValue
    End Property
    
    Property Let MaxValue(MaxValue As Long)
        'set the max value
        lMaxValue = MaxValue
    End Property
    Iain, thats with an i by the way!

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    so can you give me an example of how I can make it change the back color thourgh that way
    NXSupport - Your one-stop source for computer help

  4. #4
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    Code:
    Private lBackColour As Long
    
    Property Get BackColor() As Long
        BackColor = lBackColour
    End Property
    
    Property Let BackColor(Color As Long)
        lBackColour = Color
        'then set the backcolour of whatever
    End Property
    Iain, thats with an i by the way!

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    thanks
    NXSupport - Your one-stop source for computer help

  6. #6
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Rotterdam, Netherlands
    Posts
    386
    If you use OLE_COLOR instead of long, you get the button with the ... on it with which you can select a custom colour, and you get the drop down with system colours...
    Hope this helps

    Crazy D

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