none
Microsoft Forms 2.0 TextBox list of properties and methods? RRS feed

  • Question

  • (1) I can't find any documentation for Microsoft Forms 2.0 controls; I've searched for keywords like FM20 and Forms 2.0 documentation, properties, methods... although I can find plenty of discussions and pages on particular issues, I can't find any actual documentation.

    I want a list of what is available (firstly, to confirm that things like .selstart and .sellength are available for the textbox, and to browse to see if there are any .scroll properties or methods.

    (2) Intellisense doesn't pick up these properties or events as they're ActiveX plugins... does anyone know a workaround to make intellisence populate the lists for these objects aside from the generic ones it gives for all objects?

    (Context: VBA Access 2007 forms; I can't use the built-in textbox as the length of the text is beyond the maximum, on many records).

    Saturday, December 29, 2012 3:42 PM

All replies

  • I don't understand your context - the built-in Access text box can display very long strings. I'd avoid using a Forms text box in Access.

    If you create a userform in Excel or Word, you can get help and IntelliSense.


    Regards, Hans Vogelaar

    Saturday, December 29, 2012 4:51 PM
  • Thanks for the quick reply.

    The built-in access text box does accept very long strings, this is true. But I have have many memo fields in a T_URL table that are way over that limit (the legth limit is 2^15 or 2^16). I have some very prolific users. The memos hold HTML & CSS, written manually (not via RTF).

    Question: If you recommend not using textboxes in Access, how do you recommend editing large text memo fields via forms? I cannot think of any other sensible way.

    MS Access has IntelliSense too, but, with Forms 2.0 they don't populate (i.e., properties such as .selstart do not appear, even though they exist).

    As per the OP I'm after an authoritive list of properties and methods for the Forms 2.0 Textbox. I know they (probably) inherit everything from the TextBoxBase (see http://msdn.microsoft.com/en-us/library/system.windows.forms.textbox.aspx ), but I'd like to work from documentation rather than assumption!


    Saturday, December 29, 2012 5:15 PM
  • Of course I use Access text boxes to edit memo fields, but never an MSForms text box.

    An Access text box can edit text strings up to 64,000 characters in length; this should be sufficient for most purposes. I can't really imagine editing a longer text in either an Access text box or an MSForms text box - I'd use a dedicated, preferably HTML-aware text editor.

    But, if you set a reference in Tools | References... to the Microsoft Forms 2.0 Object Library (i.e. FM20.DLL), you'll get help and IntelliSense. The screenshot below is from Access 2010, but it should work the same in Access 2007.


    Regards, Hans Vogelaar

    Saturday, December 29, 2012 6:14 PM
  • Intellisense: Oh, I thought IntelliSense would never work for these - it doesn't work for me! Although all the properties and methods work as expected (as long as I can guess what they're called), the Properties dialogue box in the Object Editor for the textbox only shows the basic Active X events (Got Focus, Lost Focus, a few others), and, intellisence drop down doesn't understand the object. If I type:

         Txt_Content.

    Then the options that appear in the IntelliSense list are all the generic objects ones - it doesn't even have the .text property, let alone all the .sellength, sel.start, etc, ones. This has been the case in Access 2003 and 2007; once when I looked into it I was told it wouldn't pick them up.

    I definitely have the object reference set as you say. I've just checked, and I'm sure the object wouldn't work if I didn't. Is there anything else I need to do to make IntelliSense work, then?

    Documentation: Office 2007 help is nowhere near as useful as the screenshot you've provided; I only get:

    And this doesn't have any links or clickable areas that might reveal a list of properties/methods/events. Also, I'm fairly sure it is referring to the built-in Textbox rather than the Forms 2.0 one. When I search offline help, I also can't find anything on Forms 2.0 objects.

    P.S. Yes the CM_Content field is very often over the 64k limit. The code gives them a list of sections (based on H1 and H2 header titles) and they can click on them and it takes them to the right part of the CM_Content 


    • Edited by Vexen_Crabtree Saturday, December 29, 2012 7:15 PM Put in screenshot instead of text.
    Saturday, December 29, 2012 7:12 PM
  • Perhaps someone else with Access 2007 can comment.


    Regards, Hans Vogelaar

    Saturday, December 29, 2012 7:21 PM
  • It isn't the first time I've tried to get IntelliSense working, nor the first time I've tried to find documentation, I've just never got around to asking a new question of my own for that purpose!

    Thanks very much for your time, regards.

    Saturday, December 29, 2012 7:59 PM
  • I've hit another part of development where I need some documentation for Microsoft Forms 2.0 controls! After another round of Googling, still no luck!

    Anyone know where to find it?

    Or at least... can anyone in a position to know actually confirm that there is none, if that's the case, so I don't waste any more time looking?

    Saturday, June 1, 2013 1:33 PM
  • The same problems with Intellisense and a complete lack of documentation exists in MS Office Professional Plus 2013, which I upgraded to several months ago.

    I haven't repeated internet searches for the Forms 2.0 documentation, I'm sure that Microsoft have far more important things to be doing than making help pages - like designing bigger and bigger icons for products.

    Wednesday, May 7, 2014 2:11 AM
  • Wednesday, May 7, 2014 6:12 AM

  • The title of this threat, my original post, and all of the replies make it very clear that I am looking for documentation for MS Forms 2.0 objects. They are built into MS Office and the Office VBA environment by default. I've been Googling it for an hour again today, and still no luck.

    All the objects listed on the link you posted are the standard form objects, not the Microsoft Forms 2.0 objects that I am looking for. You are the same person who tried to help me with this query in 2012... do you know of anyone else who knows enough about MS Forms 2.0 to be able to answer two questions?

    (1) Where is the documentation?

    (2) How do you get IntelliSense to work with MS Forms 2.0 objects?

    For more on both those questions, read the thread above which already explains it all.



    Saturday, June 14, 2014 1:58 PM
  • We seem to be going round in circles...

    (1) The links that I posted ARE for the Microsoft Forms 2.0 Object Library = MSForms 2.0 = FM20.DLL, NOT for forms in Microsoft Access.

    (2) If you have a reference to the above library, IntelliSense should work:


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Saturday, June 14, 2014 3:46 PM
  • Thanks for sticking with me, and sorry that you also think we're going round in circles! There is always the (good!) chance that I'm using some piece of terminology wrongly, or something, which is confusing the issue. Tomorrow I'll gather some screenshots together which will hopefully help sort it out.
    Saturday, June 14, 2014 10:07 PM
  • To develop this further, is there a way to show formatted text (centered, multiple fonts, etc.) in a Microsoft Forms 2.0 text box? Or is there an alternative in VBA?
    • Edited by Roy1953 Sunday, August 17, 2014 11:39 AM
    Sunday, August 17, 2014 11:38 AM
  • No, the MSForms text box only displays plain text, it does not support formatting of individual characters or paragraphs.

    VB6 has a RichTextBox control, but it has been disabled for use in MS Office because of security problems.

    You'd need to use a third-party ActiveX control, but that control would have to be installed on each user's computer, not an attractive idea...


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Sunday, August 17, 2014 1:41 PM
  • OK, I'm working on this again. I'm on Microsoft Access 2013 version 15.0.4659. This problem existed in Access 2007 too (as per the start of this thread). I'm also now in Windows 8. The same problem persists:

    MS Forms 2.0 objects do not have any of their specific properties in the Intellisense menu.

    The references are (as always) set correctly. This has been obvious all along, else the FOrms 2.0 Text Box would not be working at all.

    So we're trying to get out of the "cirlce" we keep running in, here are more screenshots. This is the form editor for the Forms 2.0 Textbox - it shows that the object is a Microsoft Forms 2.0 object with a class of Forms.TextBox.1 . This is just an ordinary MS Forms 2.0 Text Box, inserted into a form. It is actually the only control in the form - the whole form exists just as a pop-up for editing long memo fields in the app. Many (hundreds) of those memo fields are over 64k in length, hence, why I need to use this Forms 2.0 Object, as the standard TextBox control is limited to 64k.

    Sunday, November 9, 2014 4:03 PM
  • When in the VBA Editor, by typing "TxtBox." , the IntelliSense menu pops up. It should contain all the properties for the TxtBox. It doesn't. (I am recapping the fault, as this thread is long). Witness the .WordWrap property not appearing in IntelliSense:

    Note that in the KeyDown event, as picture, you can see the code that uses the WordWrap property. This code works - pressing F11 runs that line with no error. Forms 2.0 TextBoxes have a .wordwrap property, but, for Forms 2.0 objects, only the generic Object properties appear (width, height, name, etc), and none of the MS Forms 2.0-specific properties. I.e., IntelliSense is not picking up Forms 2.0 properties.

    The above 3 screenshots have been in support of the second part of the original post:

    (2) Intellisense doesn't pick up these properties or events as they're ActiveX plugins... does anyone know a workaround to make intellisence populate the lists for these objects aside from the generic ones it gives for all objects?

    The first part (still unanswered) asks:

    1) I can't find any documentation for Microsoft Forms 2.0 controls; I've searched for keywords like FM20 and Forms 2.0 documentation, properties, methods... although I can find plenty of discussions and pages on particular issues, I can't find any actual documentation.

    I want a list of what is available (firstly, to confirm that things like .selstart and .sellength are available for the textbox, and to browse to see if there are any .scroll properties or methods.

    Here are some typical places where Microsoft could have linked to the MS Forms 2.0 documentation / help pages (wherever they are), but hasn't (just letting you know I have continued to search for them!):

    https://support.microsoft.com/kb/171673
    https://support.microsoft.com/kb/224305   (which at least lists MS Forms 2.0 objects, including the TextBox, but gives no list of properties or methods for them).

    Sunday, November 9, 2014 4:18 PM
  • My comment comes late, but maybe you are still searching for a complete list of all properties and methods of the MsForm.Textbox.

    Usually, when I can not find any documentation for an object, i help myself by examine the object using the "Typelib information"
    Just add a reference to the TLBINF32.dll (found in SysWow64)

    With the following code, you will receive a complete list of all methods and properties (get, let and set) for a MSForms.TextBox:

    usage:

    ListProperties Me.TextBox0

    code:

    Public Sub ListProperties(ByRef textBox As CustomControl)
        Dim typeApp As TLI.TLIApplication
        Dim typeinfo As TLI.typeinfo
        Dim interface As TLI.InterfaceInfo
        Dim member As TLI.MemberInfo
        Dim kind As String
        Dim obj As Object
        
        Set obj = textBox
        kind = "TextBox"
        Set typeApp = New TLI.TLIApplication
    ReDo:
        Set typeinfo = typeApp.ClassInfoFromObject(obj)
        For Each interface In typeinfo.Interfaces
            For Each member In interface.Members
                Select Case member.InvokeKind
                    Case INVOKE_CONST
                        Debug.Print kind, "Const:        ", member.Name
                    Case INVOKE_EVENTFUNC
                        Debug.Print kind, "Event:        ", member.Name
                    Case INVOKE_FUNC
                        Debug.Print kind, "Method:       ", member.Name
                    Case INVOKE_PROPERTYGET
                        Debug.Print kind, "Property Get: ", member.Name
                    Case INVOKE_PROPERTYPUT
                        Debug.Print kind, "Property Let: ", member.Name
                    Case INVOKE_PROPERTYPUTREF
                        Debug.Print kind, "Property Set: ", member.Name
                    Case INVOKE_UNKNOWN
                        Debug.Print kind, "Unknown:      ", member.Name
                End Select
            Next
        Next
        If Not obj Is textBox.Object Then
            Set obj = textBox.Object
            kind = "Object "
            GoTo ReDo:
        End If    
    End Sub

    result:

    (...)
    TextBox       Property Get:               Name
    TextBox       Property Let:               Name
    TextBox       Method:                     Move
    (...)
    Object        Property Let:               WordWrap
    Object        Property Get:               WordWrap
    Object        Method:                     Copy
    Object        Method:                     Cut
    Object        Method:                     Paste
    (...)
    

    Note that intellisence only lists the properties and methods of the superior type CustomControl.
    The rest of the properties and methods like the missing "WordWrap"-property are "hidden" in the underlying "Object".

    If you do not feel like using the obove code, you still can examine the "missing" properties by expanding the "Object" Node in the local view:

    local view

    Regards, Chris

    Friday, March 13, 2015 8:58 PM