Results 1 to 9 of 9

Thread: [RESOLVED] Help retrieving properties

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Resolved [RESOLVED] Help retrieving properties

    Hi,
    I would like to know if there is any way to retrieve a windows'(a form/control) properties

    Thanks in Advance,
    Dark Link

  2. #2
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,168

    Re: Help retrieving properties

    not sure, but I think you could use GetWindowLong().

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: Help retrieving properties

    i think I didn't made myself clear

    what i need is a function that will give me the windows properties (Ex:TextBox.Enabled, TextBox.PasswordChar, etc)

  4. #4
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Help retrieving properties

    this code by jcis will probably point in you the right direction.

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: Help retrieving properties

    what i need is a piece of code that will change or retrieve the properties from some other window

    Ex: I have two programs, one with a textbox
    I want to know if t is possible from the other program to change the enabled state, the passwordchar, etc to the textbox in the first program

  6. #6
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Help retrieving properties

    so this is an app you don't have source code to?

    'properties' in the VB IDE sense don't exist in compiled applications.

    to enable / disable a window (be it a form / textbox / command button) use the Enable Window API

    to set the password character, you'd have to send a EM_SETPASSWORDCHAR message to the textbox

  7. #7

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: Help retrieving properties

    Thanks

    I'll try it ASAP and then I'll say if it worked or not

  8. #8

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: Help retrieving properties

    The EnableWindow function worked OK but EM_SETPASSWORDCHAR isn't working with SendMessage

    Should I try with PostMessage?
    How can I do the same with the vb6 locked state?

    EDIT: EM_SETPASSWORDCHAR was actually working, but I did a simple mistake

  9. #9

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