Results 1 to 3 of 3

Thread: UserControl - Setting alignment property!

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2002
    Posts
    229

    UserControl - Setting alignment property!

    Hi,
    I'm making my own Active X control (TitleBar) and would like to align it to the top and have it always stretched out as wide as the form. So, I activated the alignment property. So I can add the titlebar to a form and set the alignment to vbAlignTop. But I would like the titlebar to automatically set the Alignment property to vbAlignTop, but I don't know how to do that.

    I tried to do something like

    UserControl.Alignment = vbAlignTop

    but that didn't work! :S Any ideas?

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    In the usercontrol code :
    VB Code:
    1. Private Sub UserControl_InitProperties()
    2.     Extender.Align = vbAlignTop
    3. End Sub
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3
    Member
    Join Date
    Mar 2002
    Location
    India
    Posts
    49
    hi

    Private Sub UserControl_Resize()
    ' Here u specify the UserControl.Top, userControl.Left
    end sub

    manesh
    ========================
    Think Twice when u Start or Stop.
    ========================

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