Hello All
I am using VB 6. I am trying to get the text in the tittle
bar of the window i click by using GetWindowText API
function but its not working. Here is the code i am using:-
Private Declare Function GetWindowText Lib "user32"
Alias "GetWindowTextA " (ByVal hwnd As Long, ByVal
lpszString As String, ByVal cch As Long) As Long
Private Declare Function WindowFromPoint Lib "user32"
(ByVal xPoint As Long, ByVal yPoint As Long) As Long
Private Declare Function SetCapture Lib "user32" (ByVal
hwnd As Long) As Long
Private Declare Function ReleaseCapture Lib "user32" () As
Long
Private Declare Function ClientToScreen Lib "user32"
(ByVal hwnd As Long, lpPoint As POINTAPI) As Long
Dim blnChoose As Boolean
Private Sub Command1_Click( )
blnChoose = True
intRetVal = SetCapture(hwnd )
End Sub
Private Sub Form_Load()
blnChoose = False
End Sub
Private Sub Form_MouseDown( Button As Integer, Shift As
Integer, X As Single, Y As Single)
Dim window As Long
Dim buffer As String * 1024
Dim ptPoint As POINTAPI
If blnChoose Then
ptPoint.X = X
ptPoint.Y = Y
retval = ClientToScreen( hwnd, ptPoint)
window = WindowFromPoint (ptPoint.X, ptPoint.Y)
lngRetVal = GetWindowText(w indow, buffer, 1024)
Text1.Text = buffer
End If
End Sub
Please tell me if there is any problem in this code so
that my prob. can be solved
thanks 2 1951
Hi Shalender,
This is a VB.net newgroup as you could seen in your previous answers you
have got it is a very different language from VB6.
There are very much VB6 language newsgroups also,
They called often public.vb with a lot of special subjects.
You better place your questions in those newsgroups, because the first time
people will answer you here because most are very polite, but by keeping
doing it, some of us become a little bit sad.
Cor I am using VB 6. I am trying to get the text in the tittle bar of the window i click by using GetWindowText API function but its not working. Here is the code i am using:-
* "shalender verma" <ve**********@y ahoo.com> scripsit: Hello All I am using VB 6. I am trying to get the text in the tittle bar of the window i click by using GetWindowText API function but its not working. Here is the code i am using:-
<http://www.blackbeltvb .com/free/classspy.htm>
VB6 groups: microsoft.publi c.vb.*.
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: dan glenn |
last post by:
hi. I want to code a 'preview' function into a guestbook entry page. I can
do it with a button that posts, bringing up a whole new page showing a
preview of what has been entered, and then the user could hit a 'return to
entry form' button or some-such and go back to the form.
But what I want to do instead is just use an HTML link with some javascript
to grab the form's textarea value, and open another browser window that uses
a php file...
|
by: Chris Maloof |
last post by:
Hello,
Does anyone know how I can read the ASCII text from a console window
(from another application) in WinXP? It doesn't sound like a major
operation, but although I can find the window via pywin32, I haven't
been able to do anything with it. I'd really just like to get the
window text into a string.
By "console window", I mean the sort of thing that comes up when you
run "command" (although this particular one is for the game...
|
by: NeverLift |
last post by:
But, if it's not open, I don't want to open it . . . using
window.open will open it if it doesn't exist, even if the url in that
open is null (the window is then empty -- but it's open).
The situation is: A main window opens child windows one at a time as
the user requests, each with its own name. The user may click in any
child window or the main window to open a summary window, which has a
name all windows know. I want to get that...
|
by: Michael Bierman |
last post by:
Please forgive the simplicy of this question. I have the following code
which attempts to determine the color of some text and set other text
to match that color. It works fine in Firefox, but does nothing in IE.
I'd be greatful for any assistance. Also, if I will have problems the
code on Opera or Safari, I'd appreciate any pointers--I don't have a
Mac to test Safari.
THanks very much,
Michael
|
by: fotzor |
last post by:
Hi,
I'm a C++-Programmer and want to subclass the Edit used to write a
SQL-Query in Access. The edit is of the special Access class OKttbx.
Everything works, I injected a DLL into the Access-Process and the
subclassing works but I can't get the Windowtext of the control...I
tried the WM_GETTEXT message but it seems that Microsoft uses another
way to get the text the user typed in.
Has somebody an idea how I can get this to work?
mfg...
| |
by: shalender verma |
last post by:
i want to get the text written in the tittle bar of the
window of any other application which apperars on the back
of the form.
e.g i created a form and minimized that form and then i
opened a ms-word window now i again activated that vb form
i created. now i want the text in the tittle bar of the
word window which appears at the back of my vb form
plase give me the solution
|
by: shalender verma |
last post by:
I am using VB6. I want to get the text in the tittle bar
of any opened window of other app. such as word,excel or
any app. appering at the back of my vb form. What i am
doing is i created a small size form and then i have
minimized that form. now i run any other app. then i
clicked on my minimized form, it will appear at the top &
in the front of the application i run later. AT this
moment i can see the tittle bar of the window at the...
|
by: sundew |
last post by:
so here is the test case:
<head>
<script type='text/javascript'>
// this function simply returns the number of enumerable
namespaces(objects)
function numNSpaces(){
var num = 0;
for(var i in window)
++num;
|
by: fastestindian |
last post by:
Hi,
I am working windows CE application.
I am opening a page which has Textbox in it.
In that TextBox I am showing a text report.
Previously the font of text was 'Tahoma' as system font was Tahoma too.
But now i want to show report in 'Corier New' Font but I am facing new.
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |