Results 1 to 7 of 7

Thread: Is there a control similar to the VB6 properties window?

  1. #1

    Thread Starter
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827

    Is there a control similar to the VB6 properties window?

    Hello there! This is my first post to General VB in absolutely ages

    Anyway here's the problem: I need a control that will do what the properties window in VB6 does - a list of different named attributes with corresponding input facilities next to the names. Attributes that are plain text get textboxes next to them, those that are files get those textboxes with the [...] button that brings up the file dialog, attributes which have a certain number of constants get a combobox with the list of constants available by dropping down the list..... I think you get the idea

    So, is there a control that does this? I figure there must be since it's used in a few places and seems like a useful kinda thing.

    Any suggestions?
    Harry.

    "From one thing, know ten thousand things."

  2. #2
    Bouncy Member darre1's Avatar
    Join Date
    May 2001
    Location
    Peterborough, UK
    Posts
    3,828
    lookup "property pages" in the MSDN help

    You can create property pages for your own ActiveX controls, i think that's what you're after.

    Good luck
    Confucious say, "Man standing naked in biscuit barrel not necessarily ****ing crackers."

    Don't forget to format your code in your posts

  3. #3
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539
    i assume your talking about properties for your activex controls

    if yes, then go through the activex wizard.
    then add "property" wizard to your "addin manager"

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    This will give you the same properties page, for a file, that Windows gives you.
    VB Code:
    1. Private Type SHELLEXECUTEINFO
    2.     cbSize        As Long
    3.     fMask         As Long
    4.     hwnd          As Long
    5.     lpVerb        As String
    6.     lpFile        As String
    7.     lpParameters  As String
    8.     lpDirectory   As String
    9.     nShow         As Long
    10.     hInstApp      As Long
    11.     lpIDList      As Long     'Optional parameter
    12.     lpClass       As String   'Optional parameter
    13.     hkeyClass     As Long     'Optional parameter
    14.     dwHotKey      As Long     'Optional parameter
    15.     hIcon         As Long     'Optional parameter
    16.     hProcess      As Long     'Optional parameter
    17. End Type
    18.  
    19. Private Const SEE_MASK_INVOKEIDLIST = &HC
    20. Private Const SEE_MASK_NOCLOSEPROCESS = &H40
    21. Private Const SEE_MASK_FLAG_NO_UI = &H400
    22.  
    23. Private Declare Function ShellExecuteEx Lib "shell32.dll" (SEI As SHELLEXECUTEINFO) As Long
    24.  
    25. Private Sub ShowProperties(filename As String, OwnerhWnd As Long)
    26.   'open a file properties property page for
    27.   'specified file if return value
    28.    Dim SEI As SHELLEXECUTEINFO
    29.   'Fill in the SHELLEXECUTEINFO structure
    30.    With SEI
    31.       .cbSize = Len(SEI)
    32.       .fMask = SEE_MASK_NOCLOSEPROCESS Or _
    33.                SEE_MASK_INVOKEIDLIST Or _
    34.                SEE_MASK_FLAG_NO_UI
    35.       .hwnd = OwnerhWnd
    36.       .lpVerb = "properties"
    37.       .lpFile = filename
    38.       .lpParameters = vbNullChar
    39.       .lpDirectory = vbNullChar
    40.       .nShow = 0
    41.       .hInstApp = 0
    42.       .lpIDList = 0
    43.    End With
    44.  
    45.   'call the API to display the property sheet
    46.    Call ShellExecuteEx(SEI)  
    47. End Sub
    48.  
    49. 'Usage:   Place the full path and file name in the text box
    50. Private Sub Command1_Click()
    51. Call ShowProperties((Text1.Text), Me.hwnd)
    52. End Sub

  5. #5

    Thread Starter
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Thanks guys

    What I am actually after is an ActiveX control that is, in itself, this properties window. I'm not actualls asking for something I'm doing personally, it's one of the guys I work with. I think he wants to embed this flexible property list, containing properties he can define at runtime, into a web page.

    Is that possible with what you're suggesting?
    Harry.

    "From one thing, know ten thousand things."

  6. #6

    Thread Starter
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    *Bump*
    Harry.

    "From one thing, know ten thousand things."

  7. #7
    gaffa
    Guest
    Edanmo has one (www.domaindlx.com/e_morcillo) and I think there's one on VB2TheMax (www.vb2themax.com).

    There are also a few commercial ones out and about - if you are prepared to pay, go to www.componentsource.com and have a butchers...

    - gaffa

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