Results 1 to 10 of 10

Thread: CREATING Properties

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2001
    Posts
    46

    CREATING Properties

    Is there a way to give an object more properties?---->
    Take any object,form, etc etc that has so many properties and give it another property that can be altered?

    I'm guessing this is a wee bit complicated

  2. #2

    Thread Starter
    Member
    Join Date
    Apr 2001
    Posts
    46
    is it even possible?

  3. #3
    AIS_DK
    Guest
    No it's not.

    You would have to have the sourcecode(C++) for the object, and the recompile it, with your changes included.

    But what is it, that you wan't to do with these new properties?
    Perhaps there is another way.

  4. #4
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    Of course, it is easy.

    By adding a public variable declaration in at the top of a form, you are adding a property to that form.

  5. #5
    sunnyl
    Guest
    I mean that gives you the variable name in the lists, but it won't do anything to the form, unless you loop to check that the variable has changed (?)

  6. #6
    AIS_DK
    Guest
    I was whinking more in generel.

    You can create a new "property" for a form, but you can't do this to objects in generel like buttons, listviews, etc.

    And adding the new property for the form, will only work for that particually form, and not forms in generel.

  7. #7
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    It is better to use property get and let to create custom properties so you can control the setting and getting of the value.

    e.g. Create a custon property for a form, call it frm_Id:

    Code:
    Private frm_id As Long
    
    Public Property Get Id() As Long
        Id = frm_id
    End Property
    
    Public Property Let Id(SubmitId As Long)
        frm_id = SubmitId
    End Property

  8. #8
    sunnyl
    Guest
    Doing that to store data is no drama. But I think what we mean here is actually physical changes to the appearance of the form.

  9. #9
    not all properties change the appearance of something.
    Matt Bradbury

    An optimist will claim the glass is half full.
    A pessimist that it is half empty.
    I just think the glass is too big.

  10. #10

    Thread Starter
    Member
    Join Date
    Apr 2001
    Posts
    46

    ¿

    I was actually referring to changing the properties of objects. Shouldnt really have mentioned forms. I was expecting an answer something like altering its source code like AIS said.
    So c++ is the most common for creating controls?

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