473,725 Members | 2,220 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Read another applications textboxes (VB 2005)

Hi everyone,
I have created my first real life application, that runs in the system tray
and monitors changes to the clipboard, then depending on the content it may
search our stock file and display the current stock situation in a balloon
(using balloontiptext) .

I now want to add extra functionality to my program by making it read text
from any other application without the user having to copy text to the
clipboard.

I have a timer that runs every couple of seconds and I have managed to get
the windows title from any program that is currently running, into a
variable in my application, but I can't figure out how to read other fields
on the users application (ideally which ever has the focus)

Ideally I want to copy the entire content of an email body into a vairable
in my application, so I can then search it for product codes, and then if
necessary provide stock info in a bubble.

Can anyone help ?, sample code much appreciated as I am new to VB.net and I
have previously only worked with MSAccess VBA.

Thanks

Paul
Oct 18 '06 #1
4 2625
The down and dirty way I'd try to do it would be by simulating a mouse
click in the text box, then sending a "ctrl-A" for select all, then
"ctrl-c" for copy - your app should take care of the rest. I would
image this would be disruptive to an end user though.

Brad
Paul wrote:
Hi everyone,
I have created my first real life application, that runs in the system tray
and monitors changes to the clipboard, then depending on the content it may
search our stock file and display the current stock situation in a balloon
(using balloontiptext) .

I now want to add extra functionality to my program by making it read text
from any other application without the user having to copy text to the
clipboard.

I have a timer that runs every couple of seconds and I have managed to get
the windows title from any program that is currently running, into a
variable in my application, but I can't figure out how to read other fields
on the users application (ideally which ever has the focus)

Ideally I want to copy the entire content of an email body into a vairable
in my application, so I can then search it for product codes, and then if
necessary provide stock info in a bubble.

Can anyone help ?, sample code much appreciated as I am new to VB.net and I
have previously only worked with MSAccess VBA.

Thanks

Paul
Oct 18 '06 #2
Thanks Brad,
I've just tried this, but its unusable, and I cant find a command to
de-select all, so I used the END key.

This would also prevent the user from being to use the clipboard for what
they want it for.

Any other suggestions much appreciated.

Paul
"Blarneysto ne" <Br*******@gmai l.comwrote in message
news:11******** *************@m 73g2000cwd.goog legroups.com...
The down and dirty way I'd try to do it would be by simulating a mouse
click in the text box, then sending a "ctrl-A" for select all, then
"ctrl-c" for copy - your app should take care of the rest. I would
image this would be disruptive to an end user though.

Brad
Paul wrote:
>Hi everyone,
I have created my first real life application, that runs in the system
tray
and monitors changes to the clipboard, then depending on the content it
may
search our stock file and display the current stock situation in a
balloon
(using balloontiptext) .

I now want to add extra functionality to my program by making it read
text
from any other application without the user having to copy text to the
clipboard.

I have a timer that runs every couple of seconds and I have managed to
get
the windows title from any program that is currently running, into a
variable in my application, but I can't figure out how to read other
fields
on the users application (ideally which ever has the focus)

Ideally I want to copy the entire content of an email body into a
vairable
in my application, so I can then search it for product codes, and then if
necessary provide stock info in a bubble.

Can anyone help ?, sample code much appreciated as I am new to VB.net and
I
have previously only worked with MSAccess VBA.

Thanks

Paul

Oct 18 '06 #3
You may take a look at the following thread:

http://groups.google.com/group/micro...97ddccb84315be

Thanks,

Seth Rowe
Paul wrote:
Thanks Brad,
I've just tried this, but its unusable, and I cant find a command to
de-select all, so I used the END key.

This would also prevent the user from being to use the clipboard for what
they want it for.

Any other suggestions much appreciated.

Paul
"Blarneysto ne" <Br*******@gmai l.comwrote in message
news:11******** *************@m 73g2000cwd.goog legroups.com...
The down and dirty way I'd try to do it would be by simulating a mouse
click in the text box, then sending a "ctrl-A" for select all, then
"ctrl-c" for copy - your app should take care of the rest. I would
image this would be disruptive to an end user though.

Brad
Paul wrote:
Hi everyone,
I have created my first real life application, that runs in the system
tray
and monitors changes to the clipboard, then depending on the content it
may
search our stock file and display the current stock situation in a
balloon
(using balloontiptext) .

I now want to add extra functionality to my program by making it read
text
from any other application without the user having to copy text to the
clipboard.

I have a timer that runs every couple of seconds and I have managed to
get
the windows title from any program that is currently running, into a
variable in my application, but I can't figure out how to read other
fields
on the users application (ideally which ever has the focus)

Ideally I want to copy the entire content of an email body into a
vairable
in my application, so I can then search it for product codes, and then if
necessary provide stock info in a bubble.

Can anyone help ?, sample code much appreciated as I am new to VB.net and
I
have previously only worked with MSAccess VBA.

Thanks

Paul
Oct 18 '06 #4
I have read this but I still can't manage to get it to work (Mainly because
I'm a beginner who's bitten off more than I can chew !)

Any chance anyone out there can supply a .NET example of how to take the
text from a notepad txt file when it has focus and put it in a vairable in
my app, I should be able to convert that to work with my app then.

Again a big Thanks to all.

Paul
"rowe_newsgroup s" <ro********@yah oo.comwrote in message
news:11******** **************@ k70g2000cwa.goo glegroups.com.. .
You may take a look at the following thread:

http://groups.google.com/group/micro...97ddccb84315be

Thanks,

Seth Rowe
Paul wrote:
>Thanks Brad,
I've just tried this, but its unusable, and I cant find a command to
de-select all, so I used the END key.

This would also prevent the user from being to use the clipboard for what
they want it for.

Any other suggestions much appreciated.

Paul
"Blarneyston e" <Br*******@gmai l.comwrote in message
news:11******* **************@ m73g2000cwd.goo glegroups.com.. .
The down and dirty way I'd try to do it would be by simulating a mouse
click in the text box, then sending a "ctrl-A" for select all, then
"ctrl-c" for copy - your app should take care of the rest. I would
image this would be disruptive to an end user though.

Brad
Paul wrote:
Hi everyone,
I have created my first real life application, that runs in the system
tray
and monitors changes to the clipboard, then depending on the content
it
may
search our stock file and display the current stock situation in a
balloon
(using balloontiptext) .

I now want to add extra functionality to my program by making it read
text
from any other application without the user having to copy text to the
clipboard.

I have a timer that runs every couple of seconds and I have managed to
get
the windows title from any program that is currently running, into a
variable in my application, but I can't figure out how to read other
fields
on the users application (ideally which ever has the focus)

Ideally I want to copy the entire content of an email body into a
vairable
in my application, so I can then search it for product codes, and then
if
necessary provide stock info in a bubble.

Can anyone help ?, sample code much appreciated as I am new to VB.net
and
I
have previously only worked with MSAccess VBA.

Thanks

Paul

Oct 19 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
8578
by: Tolgay Gül | last post by:
I need some codes that able to send and read data by serialport in VB.Net 2005 beta 2. I wrote some codes and It can send data via serialport but It cannot read what I send. I have looked up on internet and msdn and found some codes and samples but they are also can't read serial port. . It was so easy in VB 6.0 with mscomm object and oncommread events but now I don't understand how it reads data from serialport. You can see the codes...
4
1212
by: Usarian Skiff | last post by:
Is it possible to enter data into other applications' textboxes and datagrids? I want to automate our production control software (like a macro). It's written in VB6, and I have access to the form names. I'm programming in VB.net (1.1).
4
2393
by: Skc | last post by:
We have a developer who has made an application in Visual Studio 2003 and this will not work in our version of Visual Studio 2002. Error message: Solution file loading error: The selected file is not a valid Visual Studio Solution file. When we try to load a project file, we get: Unable to read the project file. The project was created with a newer
0
8889
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8752
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,...
0
9401
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, 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...
0
9257
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 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...
0
8099
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, 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...
1
6702
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 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...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3228
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

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.