Read text from a StatusBar control in another application
Read text from a StatusBar control in another application
Read text from a StatusBar control in another application
Read text from a StatusBar control in another application
Read text from a StatusBar control in another application
Read text from a StatusBar control in another application Read text from a StatusBar control in another application Read text from a StatusBar control in another application Read text from a StatusBar control in another application Read text from a StatusBar control in another application Read text from a StatusBar control in another application Read text from a StatusBar control in another application Read text from a StatusBar control in another application
Read text from a StatusBar control in another application Read text from a StatusBar control in another application
Read text from a StatusBar control in another application
Go Back  Xtreme Visual Basic Talk > > > Read text from a StatusBar control in another application


Reply
 
Thread Tools Display Modes
  #1  
Old 01-07-2016, 03:43 PM
Sajukai Sajukai is offline
Newcomer
 
Join Date: Jan 2016
Posts: 1
Default Read text from a StatusBar control in another application


Hello,

Previously Mathimagics wrote this fabulous demo on how to read text from a StatusBar control in another process. Cross-Process Data Extraction #4 (Status Bar)

The process is working for me up until the point of actual text retrieval. Everything is the same as his demo except for:
Code:
hSbar = &H42069C          ' MY TEST CASE!!!
to
Code:
'hSbar = &H42069C          ' MY TEST CASE!!!
hSbar = FindWindow("ThunderRT6FormDC", "Dictionary Login Identifications")
hSbar = FindWindowEx(hSbar, 0&, "StatusBarWndClass", vbNullString)
in order to work with the app I am trying to retrieve the status bar text of. The debug results I receive are:
Code:
SB has 3 parts
txtlen(1) = 0
txtlen(2) = 0
txtlen(3) = 0
However we know the statusbar (should be first int within) has the text of "Already Exists".

I added in the tlength value from SB_GETTEXTLENGTH just incase that helps any:
Code:
SB has 3 parts
tLength before AND &HFFF&= 301989888
txtlen(1) = 0
tLength before AND &HFFF&= 268435456
txtlen(2) = 0
tLength before AND &HFFF&= 16777216
txtlen(3) = 0
Structurally the app is (ClassNames):
Code:
ThunderRT6FormDC
     StatusBarWndClass (child of ThunderRT6FormDC)
          ThunderRT6PictureBoxDC (Child of StatusBarWndClass) - Appears to be used as an overlay for a visual progress bar
further info references/constants:
Code:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

Private Const WM_USER = &H400&
Private Const SB_GETTEXTLENGTH As Long = (WM_USER + 3)
Private Const SB_GETTEXT As Long = (WM_USER + 2)
Private Const SB_GETPARTS As Long = (WM_USER + 6)
I am trying to achieve this from within VBA and I am not sure why the text won't retrieve, if anyone is able to provide any assistance it would be immensely appreciated.

Cheers,
Reply With Quote
Reply

Tags
text, private, wm_user, hsbar, tlength, const, statusbarwndclass, byval, statusbar, &hfff&=, child, control, read, thunderrt6formdc, test, demo, &h42069c, txtlen2, retrieve, app, bar, sb_gettextlength, txtlen3, process, txtlen1


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Read text from a StatusBar control in another application
Read text from a StatusBar control in another application
Read text from a StatusBar control in another application Read text from a StatusBar control in another application
Read text from a StatusBar control in another application
Read text from a StatusBar control in another application
Read text from a StatusBar control in another application Read text from a StatusBar control in another application Read text from a StatusBar control in another application Read text from a StatusBar control in another application Read text from a StatusBar control in another application Read text from a StatusBar control in another application Read text from a StatusBar control in another application
Read text from a StatusBar control in another application
Read text from a StatusBar control in another application
 
Read text from a StatusBar control in another application
Read text from a StatusBar control in another application
 
-->