Results 1 to 3 of 3

Thread: Using subs inside ActiveX Control

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2002
    Posts
    95

    Question

    Hi,
    Im new to ActiveX Programming,
    and I would like to know the following thing:
    If I have a private sub inside my ActiveX Control project, lets say somthing like this:

    private sub DrawLine (lineType as Interger)
    end sub

    I want to add a property that evetually will raise itself to the LineType interger.

    So when the user calls the method for drawing the line,
    my ActiveX control will call the private sub DrawLine.


    How can this be done??

    Thanks!

  2. #2
    Hyperactive Member tumblingdown's Avatar
    Join Date
    Mar 2000
    Posts
    362

    eh?

    i'm not following your question.

    You have a private method that you wish to call from a public method - is this what you want to do?


    td.
    "One logical slip and an entire scientific edifice comes tumbling down." - Robert M. Pirsig


    [email protected]

    "but if Einstein is right and God is in the details, reality requires that we sometimes get religion." - Scott Meyers.

  3. #3
    Fanatic Member
    Join Date
    Jun 1999
    Location
    California, USA
    Posts
    662
    When the property is set in the activex control, set a variable to the new value. When your ready to call the private sub, just pass the variable to it as the argument.


    Code:
    Public Property Let Blank(newValue as Integer)
        ...
        m_Blank = newvalue
        ...
    End Property
    
    Public Sub DrawIt()
        ...
        Call DrawLine(m_Blank)
        ...
    End Sub
    tumblingdown A single can of diet ANYTHING can be deadly!

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