Results 1 to 6 of 6

Thread: a hard question, come and see

  1. #1

    Thread Starter
    Addicted Member Mih_Flyer's Avatar
    Join Date
    Mar 2000
    Location
    some place there
    Posts
    241
    ok this is a hard one
    I have an active x control, which has a text box in it, and i'm making properties, every thing is ok, but two properties are annoying me, DataSource and DataField, i want to add them to the control, and they are connected to the textbox ofcourse, but I couldn't,,, do you know how to do that?? and code please
    thanx alot

  2. #2

    Thread Starter
    Addicted Member Mih_Flyer's Avatar
    Join Date
    Mar 2000
    Location
    some place there
    Posts
    241
    come on guys, its not hat hard

  3. #3
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    the activeX controll Interface Wizard does this

    Code:
    Option Explicit
    
    'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
    'MappingInfo=Text1,Text1,-1,DataSource
    Public Property Get DataSource() As DataSource
        Set DataSource = Text1.DataSource
    End Property
    
    Public Property Set DataSource(ByVal New_DataSource As DataSource)
        Set Text1.DataSource = New_DataSource
        PropertyChanged "DataSource"
    End Property
    
    'Load property values from storage
    Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
    
        Set DataSource = PropBag.ReadProperty("DataSource", Nothing)
    End Sub
    
    'Write property values to storage
    Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
    
        Call PropBag.WriteProperty("DataSource", DataSource, Nothing)
    End Sub
    Feel free to remove the commented lines even though it says not to.

    It doesn't do anything for the DataField Property tho.

  4. #4

    Thread Starter
    Addicted Member Mih_Flyer's Avatar
    Join Date
    Mar 2000
    Location
    some place there
    Posts
    241
    it gives me that "user-defined type not defined" message for the datasource type.
    How do I define this DataSource Type???????
    please help me
    Thanx alot

  5. #5

    Thread Starter
    Addicted Member Mih_Flyer's Avatar
    Join Date
    Mar 2000
    Location
    some place there
    Posts
    241
    hello guys, any help please

  6. #6
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Brooklyn NY USA
    Posts
    1,258

    Please Help Me

    Does AnyOne Have A Answer For This

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