473,396 Members | 1,743 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.

Process MainWindowHandle

Hello all,

I am enumerating vb6 process from c# application by name.

I need to send message to all processes that has the specified name but for
this purpose I need the handle of the main window for each process returned.

I once read that vb6 app mainWindowHandle is the handle of the hidden window
that runs the application.

If so, what's the way to get the handle of the main window of each vb6
application by it's process info???

- Moty -
Nov 17 '05 #1
2 4461
Hi,

You can use the Win32 API FindWindow if you know the process name, that will
return the Window handle.

Cheers
--
Salvador Alvarez Patuel
Exony Ltd - London, UK
"Moty Michaely" wrote:
Hello all,

I am enumerating vb6 process from c# application by name.

I need to send message to all processes that has the specified name but for
this purpose I need the handle of the main window for each process returned.

I once read that vb6 app mainWindowHandle is the handle of the hidden window
that runs the application.

If so, what's the way to get the handle of the main window of each vb6
application by it's process info???

- Moty -

Nov 17 '05 #2
Hi, thanks for the reply,

I thought about it but FindWindow depands on the Z order of the windows.

I solved it by setting a propery like "IsWindowMain" and checking all child
forms of the MainWindowHandle.

Thanks again
-Moty-

"Salvador" <Sa******@discussions.microsoft.com> wrote in message
news:D1**********************************@microsof t.com...
Hi,

You can use the Win32 API FindWindow if you know the process name, that
will
return the Window handle.

Cheers
--
Salvador Alvarez Patuel
Exony Ltd - London, UK
"Moty Michaely" wrote:
Hello all,

I am enumerating vb6 process from c# application by name.

I need to send message to all processes that has the specified name but
for
this purpose I need the handle of the main window for each process
returned.

I once read that vb6 app mainWindowHandle is the handle of the hidden
window
that runs the application.

If so, what's the way to get the handle of the main window of each vb6
application by it's process info???

- Moty -

Nov 17 '05 #3

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

Similar topics

1
by: Sanjay Seshasainam | last post by:
How can I maximize a process window I am using the Process class in System.Diagnostics. I can identify the specific process I want using the window title after that I want to maximize the...
4
by: | last post by:
Hi, In the Process class there is a CloseMainWindow, why is there not a BringMainWindowToForeground or similar method? What would be the best way to do this if we jsut have the process info...
12
by: serge calderara | last post by:
Dear all, I have an application which is suppose to start another executable process. As soon as that process is running, I need to retrive its handle. The problem of the particular process I am...
0
by: bamapookie | last post by:
I've written an app that starts and monitors a number of processes. If one of those processes dies, the app restarts it. One of the options I've written hides the main window of the monitored...
0
by: bamapookie | last post by:
I've written an app that starts and monitors a number of processes. If one of those processes dies, the app restarts it. One of the options I've written hides the main window of the monitored...
0
by: bamapookie | last post by:
I'm sorry if this was posted several times. I did not see my previous post appear after I posted it. I've written an app that starts and monitors a number of processes. If one of those...
1
by: bamapookie | last post by:
What is the best way to check and change the window state of a process given either a System.Diagnostics.Process or a MainWindowHandle? I was using the following commands, but hide is not working...
8
by: Shachar | last post by:
Hi All, I need to start a new process calc for example and when ever the user click on the button the application should setfocus to the calc application. I use this code but it is NOT...
1
by: codejunkie | last post by:
Hi, I am running a suite of tests of a WIN 32 application. Every test launches the same application, checks if the Application has a Main Window handle and then proceeds. However i am noticing...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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,...

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.