How to get the text in a statusStrip box?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shenkepa
    New Member
    • Apr 2014
    • 4

    How to get the text in a statusStrip box?

    Hi,
    In a vb routine I try to get the text in a statusStrip box named statusStrip1 of another program, but the returned string is "statusStri p1" while the correct string is "red ball:3".Looking for help from you.
    Thanks in advance.
    Some of the routine are here:
    Code:
    ahwnd = FindWindow("WindowsForms10.Window.8.app.0.202c666", "receive")
    bhwnd = FindWindowEx(ahwnd, 0, vbNullString, "statusStrip1") 
    .........
    Call RtlMoveMemory(bArr(0), TextLen, 2)
    Call SendMessage(bhwnd, WM_GETTEXT, TextLen + 1, bArr(0))
    Call RtlMoveMemory(bArr2(0), bArr(0), TextLen)
    strRet = StrConv(bArr2, vbUnicode)
    result.Text = "text=" & strRet
    Notes: In the window "receive" there is a statusStrip box named statusStrip1 filled with a string "red ball:3".I want to get the string "text=red ball:3" while the result is "text=statusStr ip1".
    Last edited by Rabbit; Apr 7 '14, 05:41 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
  • Honduras2811
    New Member
    • Apr 2014
    • 21

    #2
    I don't know what the other application is, but you need to ask for the property that contains the text you want, not the name of the control. It's giving you the answer you are asking for, but what you are asking for is not what you want.

    Comment

    • shenkepa
      New Member
      • Apr 2014
      • 4

      #3
      Hi,Honduras2811
      Thank you for your reply.
      My VB routine is to automatically execute the other program and automatically pick up the executing result which is displayed in a answer box on the bottom of the "receive" window. In the above case the result displayed in the answer box is "red ball:3". By using Spy++ I know that the title of the answer box on the bottom is "statusStrip1", the type of the answer box is "WindowsForms10 .Window.8.app.0 .202c666". So I guest that the answer box maybe a statusStrip control. I cannot get any more information about the answer box. It seems that SendMessage(bhw nd, WM_GETTEXT, TextLen + 1, bArr(0)) can only get the title of the answer box, and cannot get the text dsplayed in the answer box. So I look for help from you to give me an function which can get the text(ex.,red ball:3) displayed in the answer box, not the title(ex.,statu sStrip1) of the answer box.

      Comment

      • shenkepa
        New Member
        • Apr 2014
        • 4

        #4
        Hi,Honduras2811
        Thank you for your reply.
        My VB routine is to automatically execute the other program and automatically pick up the executing result which is displayed in a answer box on the bottom of the "receive" window. In the above case the result displayed in the answer box is "red ball:3". By using Spy++ I know that the title of the answer box on the bottom is "statusStrip1", the type of the answer box is "WindowsForms10 .Window.8.app.0 .202c666". So I guest that the answer box maybe a statusStrip control. I cannot get any more information about the answer box. It seems that SendMessage(bhw nd, WM_GETTEXT, TextLen + 1, bArr(0)) can only get the title of the answer box, and cannot get the text dsplayed in the answer box. So I look for help from you to give me an function which can get the text(ex.,red ball:3) displayed in the answer box, not the title(ex.,statu sStrip1) of the answer box.

        Comment

        • Honduras2811
          New Member
          • Apr 2014
          • 21

          #5
          Originally posted by shenkepa
          Hi,Honduras2811
          Thank you for your reply.
          My VB routine is to automatically execute the other program and automatically pick up the executing result which is displayed in a answer box on the bottom of the "receive" window. In the above case the result displayed in the answer box is "red ball:3". By using Spy++ I know that the title of the answer box on the bottom is "statusStrip1", the type of the answer box is "WindowsForms10 .Window.8.app.0 .202c666". So I guest that the answer box maybe a statusStrip control. I cannot get any more information about the answer box. It seems that SendMessage(bhw nd, WM_GETTEXT, TextLen + 1, bArr(0)) can only get the title of the answer box, and cannot get the text dsplayed in the answer box. So I look for help from you to give me an function which can get the text(ex.,red ball:3) displayed in the answer box, not the title(ex.,statu sStrip1) of the answer box.
          Well, there's a problem. Whatever it is that has the text in it is considered an object. One of the properties of that object contains the text you want, but, in order to get to it, it is necessary to know the name of the property. In order to get that far you need to know exactly what the object is. But take a look at this thread.



          After a Google search I found out that you are not the only one having problems with this bit of Mickeysoft's silliness. It's not the kind of thing I have time for. I can only give you an idea what you are doing wrong. I can't fix it for you. The applications I write are mainly purely mathematical, or engineering (not software engineering) applications. Mickeysoft forms and the Internet are two things that I use while consciously avoiding learning anything about them. Sorry.
          Last edited by Honduras2811; Apr 8 '14, 03:16 PM. Reason: grammar

          Comment

          • shenkepa
            New Member
            • Apr 2014
            • 4

            #6
            Hi,Honduras2811
            Thank you again for your reply.
            I browsed the url:http://www.vbforums.com/showthread.p...in-nested-form. There is no help for me in it.

            Comment

            Working...