473,405 Members | 2,261 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 "statusStrip1" while the correct string is "red ball:3".Looking for help from you.
Thanks in advance.
Some of the routine are here:
Expand|Select|Wrap|Line Numbers
  1. ahwnd = FindWindow("WindowsForms10.Window.8.app.0.202c666", "receive")
  2. bhwnd = FindWindowEx(ahwnd, 0, vbNullString, "statusStrip1") 
  3. .........
  4. Call RtlMoveMemory(bArr(0), TextLen, 2)
  5. Call SendMessage(bhwnd, WM_GETTEXT, TextLen + 1, bArr(0))
  6. Call RtlMoveMemory(bArr2(0), bArr(0), TextLen)
  7. strRet = StrConv(bArr2, vbUnicode)
  8. 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=statusStrip1".
Apr 7 '14 #1
5 1727
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.
Apr 7 '14 #2
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(bhwnd, 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.,statusStrip1) of the answer box.
Apr 8 '14 #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(bhwnd, 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.,statusStrip1) of the answer box.
Apr 8 '14 #4
@shenkepa
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.

http://www.vbforums.com/showthread.p...in-nested-form

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.
Apr 8 '14 #5
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.
Apr 9 '14 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: windsurfing_stew | last post by:
Hi, Winforms has the new StatusStrip control that replaces StatusBar in 1.1. I've looked high and low but can't seem to find how to get separators (|) in my status bar, eg Info1 | Info2 |...
2
by: robertino | last post by:
Hi all, (VS 2005 Pro, XP) I'm trying to place a statusstrip control on a window such that it acts like a statusstrip (!). Every time I try this, no matter what I do, I find that when I...
2
by: jcvoon | last post by:
Hi: I'm using VS2005, I've create a winform with the following controls: Add a ToolStripContainer Set it to dock to the form (Fill) Click in the top section. Add a menu strip Add a tool...
0
by: =?Utf-8?B?UmljaA==?= | last post by:
I have a statusStrip on a form with some ToolStripStatusLabels - which function as Previous Record/Next Record, New Record buttons. And instead of text, I place an image on the...
2
by: =?Utf-8?B?QWFyb24=?= | last post by:
Since some controls such as the DataGridView take a long time to update themselves when performing certain tasks, I have added a StatusStrip with a ProgressBar on it. While I am updating the...
1
by: Carla Simeoni | last post by:
I added a StatusStrip "Sstrip1" to a Form "Form1". In the procedure private void Form1_Load(...) I added the following statement: Sstrip1.Text = "Text in my StatusStrip";
1
by: S. Viswanathan | last post by:
Hi! When mouse over on menuitem, the corresponding menuitem text should display in StatusStrip control. How to do this? Simillarly for when mouse over on toolstrip item, the corresponding...
3
by: SniperDemon | last post by:
Background: The Program runs a query on a SQL Database, then it takes the gathered information and outputs it into an excel document and saves it to a specified location. Problem: Originally I...
10
by: hzgt9b | last post by:
Using VS2005 (.NET 2.0), VB.NET, I have a windows forms application. I have a StatusStrip containing a ToolStripStatusLabal and a ToolStripProgressBar. I want to force the status label to behave...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.