Results 1 to 3 of 3

Thread: How Can I Interact With The Main Form FromThe The Activex User Control?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2001
    Posts
    14

    How Can I Interact With The Main Form FromThe The Activex User Control?

    Hello,

    I am creating and ActiveX user control. It is a title bar with exit minimize maximize buttons. Does anyone know how i can interact(send commands) with the main form that the user control will be on? Is there a keyword for it?

    Thanks.

  2. #2
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    In the UserControl:

    VB Code:
    1. [color=blue]Public[/color] TheContainer as Form
    2.  
    3. [color=blue]Private Sub[/color] Command1_Click()
    4.  
    5.     TheContainer.Caption = "Changed Caption"
    6.  
    7. [color=blue]End Sub[/color]


    In your Application:
    VB Code:
    1. [color=blue]Private Sub
    Form_Load()

    Set UserControl11.TheContainer = Me

    [color=blue]End Sub[/Highlight]
    [/Highlight]

  3. #3
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    Sorry,

    In your application:
    VB Code:
    1. [color=blue]Private Sub[/color] Form_Load()
    2.  
    3.     Set UserControl11.TheContainer = Me
    4.  
    5. [color=blue]End Sub[/color]

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