Results 1 to 2 of 2

Thread: Controling Height and Width of component when creating (Resolved)

  1. #1

    Thread Starter
    Addicted Member Aldragor's Avatar
    Join Date
    Oct 2002
    Location
    Québec, Canada
    Posts
    140

    Question Controling Height and Width of component when creating (Resolved)

    I want to set a property when dropping my ocx in a form.

    More specificaty, I want to set a property depending on witch of Height or Width is the bigger the first time my object is created on the user form using my component.

    Example: my component draw a line and depending of the box size, when creating the line, the line will be vertical or horizontal.

    If you have any clues or hints, it will be appeciated.
    Last edited by Aldragor; Oct 7th, 2002 at 06:58 AM.

  2. #2
    Lively Member neodatatype's Avatar
    Join Date
    Aug 2002
    Location
    Italy
    Posts
    103

    Re: Controling Height and Width of component when creating

    More specificaty, I want to set a property depending on witch of Height or Width is the bigger the first time my object is created on the user form using my component.
    You must use a flag on the Resize event.

    Code:
    Private bFirstTime As Boolean
    
    Sub Usercontrol_Initialize
        bFirstTime = True
    End Sub
    
    Sub Usercontrol_Resize
        If (bFirstTime) Then
            ' do it the first time!
        Else
            bFirstTime = False
        End If
    End Sub
    Cya
    > NeoDataType.net <

    Try my Free .Net Reporting Tool!

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