Results 1 to 3 of 3

Thread: Properties in activex controls

  1. #1

    Thread Starter
    Hyperactive Member Kirun's Avatar
    Join Date
    Oct 2001
    Location
    Karachi , Pakistan
    Posts
    333

    Properties in activex controls

    hi ppl

    i wanna ask that how can you add properties on a na activex controls that will pop up a new window .. for example in DAO conyrol if we go to setdatabase property another window open which is a browse window and then we select the database and when finished the data base property is set to that database which we have choosed..

    i also made same king of property .. that appear also in the property window when i paste the control on form.. i though if i can simply write the data base path in the property window it will set teh data base name at run time .. but this is not happening..

    please help
    thanks in advance

  2. #2
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Talking There are finally here...*SMACK*

    Have a property like...

    Code:
    Public Property Let DatabaseName(Optional byval strName as string = vbNullString)
       If Len(strName) = 0 then
            'Load form or Common Dialog to select file
       Else
            'Set database name equal to strName
       End If
    End Property
    This however isn't the correct way. I think I know what you're getting at, but I don't know exactally how to implement it in the correct way, like the database name...
    I will have a look for you though. I think I saw something in the General VB Questions forum on this exact topic last week...

  3. #3
    Member
    Join Date
    Feb 2000
    Location
    Kettering, Northants, England
    Posts
    56

    Talking

    Property bag could be what you're looking for. It will allow you to persist the values of properties from design time to run time. In your activeX control project goto to the Project Menu -> Add Property Page - > VB Property Page Wizard.

    If you can't get to grips with it view Karl Moore's most excellent ActiveX Control tutorial at:Tutorial (I think it's part 4.

    You then need to play with the property pages to get your own individual forms etc.

    DJ

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