471,350 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

How to get window handle of an excel application

Hi, there,

I need to get the handle of a running excel application. However, there is
no HWnd property. Following is my code:
Process [] Processes = Process.GetProcesses();
for (int i = 0; i <= Processes.GetUpperBound(0); i++)
if (Processes[i].MainWindowHandle.ToString() == ExcelApp.Hwnd.ToString())
_mExcelPID = aProcesses[i].Id;
How to get the exact program ID in this case? Thanks lot in advance!


Dec 30 '05 #1
0 1287

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Alexander Eisenhuth | last post: by
11 posts views Thread by objectref | last post: by
3 posts views Thread by TC | last post: by
8 posts views Thread by Mészáros Tamás | last post: by
18 posts views Thread by Csaba Gabor | last post: by
reply views Thread by XIAOLAOHU | last post: by

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.