473,396 Members | 1,734 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,396 software developers and data experts.

Can I control other process UI and input some data ?

Hi

How can I control other process UI and input some data value like input edit
box or click button controls ?

Is there some good sample code and tool to help me ?

Thank you .
Oct 15 '08 #1
2 1111
"Kid" <Ki*@discussions.microsoft.comwrote in message
news:CC**********************************@microsof t.com...
Hi

How can I control other process UI and input some data value like input
edit
box or click button controls ?

Is there some good sample code and tool to help me ?

Thank you .
There is no all-purpose solution but many things can be done by sending
standard windows messages to HWNDs in the other process. First use the
Spy++ tool to find the IDs of the controls you are interested in. In your
program, find the HWNDs of these controls by using FindWindow and
EnumChildWindows. As you enumerate the child windows use GetClassName and
GetWindowLong with GWL_ID to recognize and store the child HWNDs you need.

You can input text to an edit control with SendMessage(... WM_SETTEXT...).
You can click controls by sending the same message to the parent dialog that
the control sends, such as WM_COMMAND with BN_CLICKED.

--
Scott McPhillips [VC++ MVP]

Oct 15 '08 #2
"Kid" <Ki*@discussions.microsoft.comwrote in message
news:CC**********************************@microsof t.com...
Hi

How can I control other process UI and input some data value like input
edit
box or click button controls ?

Is there some good sample code and tool to help me ?

Thank you .
The most reliable way is if the other process is in the foreground, you can
simulate keystrokes/mouse events using SendInput().

-- David

Oct 16 '08 #3

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

Similar topics

18
by: jas | last post by:
Hi, I would like to start a new process and be able to read/write from/to it. I have tried things like... import subprocess as sp p = sp.Popen("cmd.exe", stdout=sp.PIPE)...
7
by: Dave | last post by:
I have two forms, Form1 and Form2. From Form2, how do I reference the value in a control on Form1? Or perhaps a more specific question: Form1 contains a textbox with the value of 10. This form...
0
by: Raven Jones | last post by:
Heya all, I'm working on a web-based application (using ASP.NET and C# on .NET 1.1.4322, supporting only IE6 for Windows) that allows for file uploads. Screen real estate is at a premium, so I...
9
by: Charts | last post by:
I use VS2005 to build a asp.net 2.0 project. I want to be able to click a button on the page and have a dialog window appear where I can navigate the folders to get hold of a file path to load...
14
by: Rolf Welskes | last post by:
Hello, I have an ObjectDataSource which has as business-object a simple array of strings. No problem. I have an own (custom) control to which I give the DataSourceId and in the custom-control...
2
by: =?Utf-8?B?SXJmYW4=?= | last post by:
Hello, It may be a repeated question but I don't find the solution to the situation that I encounter in it. My application is monitoring another application that is built in VB6. The...
2
by: Martin M. Pedersen | last post by:
Hi, I have a program where I read a lot of user data. How can I handle the case where the user press control-d ? Is it possible to disable control-d or re-open the cin ? I have made a small...
0
by: SteveBark | last post by:
Can anyone point me in the right direction as to what control structure I should put in place for the following requirement. I have an Access Server which I have 30 modems connected to. I need to...
3
by: Allen Chen [MSFT] | last post by:
Hi Richard, Quote from Richard================================================== However I also want to be able to remove the panes. I have tried to include this, but find that when I first...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...

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.