Results 1 to 2 of 2

Thread: creating ActiveX control containing FlexGrid in VB6 (not in vb5) problems

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Location
    Toronto, ON, Canada
    Posts
    2

    Post

    I have some strange problems using VB6 EE SP3 for creating ActiveX control containing MSFlexGrid.
    I put MSFlexGrid onto the control and wanted to use ActiveX Control Interface Wizard, but property
    Col and Row disappeared from the list of possible properties!

    I created 2 new public properties OpenH and OpenW - if I click on the Grid - it should be expanded in size till OpenH and OpenW. Code is very simple.
    I can set them in design time, but they are
    ALWAYS equal zero after control starts.
    ------
    I had no such king of problems in VB5 - I simply
    migrate my control from vb5 to vb6.

    Any help will be very appreciated.

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    I know, it happened to me too. BUT....you can manually create those properties.

    Code:
    Public Property Get Col() As Integer
        Col = MSFlexGrid1.Col
    End Property
    
    Public Property Let Col(ByVal pCol As Integer)
        MSFlexGrid1.Col = pCol
        PropertyChanged "Col"
    End Property
    Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
        MSFlexGrid1.Col = PropBag.ReadProperty("Col", 0)
    End Sub
    Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
        Call PropBag.WriteProperty("Col", MSFlexGrid1.Col, 0)
    End Sub
    ------------------

    Serge

    Senior Programmer Analyst
    [email protected]
    [email protected]
    ICQ#: 51055819

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