Hi,
I want to find all the windows created by a particular
process object and close them. Process class only
returns handle to Mainwindow and not other windows.
Furthermore closing mainwindow does not close all other
windows.
Can someone give pointers?
TIA,
Vinay 5 6683
Win32 API:
EnumWindows, EnumChildWindoms, GetWindowThreadProcessId
Brad Williams
"Vinay" <vi***********@rediffmail.com> wrote in message
news:01****************************@phx.gbl... Hi, I want to find all the windows created by a particular process object and close them. Process class only returns handle to Mainwindow and not other windows. Furthermore closing mainwindow does not close all other windows.
Can someone give pointers? TIA, Vinay
Thanks Brad.
Is there any functionality available in C#? I do not want
to use Interop
Vinay -----Original Message----- Win32 API: EnumWindows, EnumChildWindoms, GetWindowThreadProcessId
Brad Williams
"Vinay" <vi***********@rediffmail.com> wrote in message news:01****************************@phx.gbl... Hi, I want to find all the windows created by a particular process object and close them. Process class only returns handle to Mainwindow and not other windows. Furthermore closing mainwindow does not close all other windows.
Can someone give pointers? TIA, Vinay
.
Vinay,
If these are mdi children, I believe all you will have to do is to loop like
so:
foreach( Form f in this.MdiChildren )
{
IWinCommands iChild = (IWinCommands)f;
iChild.Save();
}
Hope this helps.
--
Glen Jones MCSD
"Vinay" <vi***********@rediffmail.com> wrote in message
news:04****************************@phx.gbl... Thanks Brad.
Is there any functionality available in C#? I do not want to use Interop
Vinay-----Original Message----- Win32 API: EnumWindows, EnumChildWindoms, GetWindowThreadProcessId
Brad Williams
"Vinay" <vi***********@rediffmail.com> wrote in message news:01****************************@phx.gbl... Hi, I want to find all the windows created by a particular process object and close them. Process class only returns handle to Mainwindow and not other windows. Furthermore closing mainwindow does not close all other windows.
Can someone give pointers? TIA, Vinay
.
Ussually it is achieved creating and mantaining a "Forms Collection" in some
shared Collection-Derived variable.
When each of your forms is loaded, you should add code to register itself in
the forms collection.
Good luck
"Vinay" <vi***********@rediffmail.com> escribió en el mensaje
news:04****************************@phx.gbl... Thanks Brad.
Is there any functionality available in C#? I do not want to use Interop
Vinay-----Original Message----- Win32 API: EnumWindows, EnumChildWindoms, GetWindowThreadProcessId
Brad Williams
"Vinay" <vi***********@rediffmail.com> wrote in message news:01****************************@phx.gbl... Hi, I want to find all the windows created by a particular process object and close them. Process class only returns handle to Mainwindow and not other windows. Furthermore closing mainwindow does not close all other windows.
Can someone give pointers? TIA, Vinay
.
You will probably need to enumerate all the windows.
There's a class here that can do that for you: http://www.gotdotnet.com/Community/U...B-81F266CE8DE2
--
Eric Gunnerson
Visit the C# product team at http://www.csharp.net
Eric's blog is at http://webblogs.asp.net/ericgu/
This posting is provided "AS IS" with no warranties, and confers no rights.
"Vinay" <vi***********@rediffmail.com> wrote in message
news:01****************************@phx.gbl... Hi, I want to find all the windows created by a particular process object and close them. Process class only returns handle to Mainwindow and not other windows. Furthermore closing mainwindow does not close all other windows.
Can someone give pointers? TIA, Vinay This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: dont bother |
last post by:
Hi Buddies,
I am facing this problem and I dont know what to use
as EOF in python:
I want to read a file, and put all the individual
words in a dictionary with their index:
For example if the...
|
by: Mike |
last post by:
Hello,
I have a few rather urgent questions that I hope someone can help with (I
need to figure this out prior to a meeting tomorrow.) First, a bit of
background: The company I work for is...
|
by: Gordon Smith |
last post by:
I have four (4) ASP.NET Web applications/Web sites on a IIS/6 - Windows
Server 2003 production server. 3 of them work fine. I just installed the 4th
one and it's Application_Start event is not...
|
by: |
last post by:
Hi all, I have a website running on beta 2.0 on server 2003 web sp1 and I
keep getting the following error:-
Error In:...
|
by: Suresh |
last post by:
Hi Guys
I have Db2 server installed on remote server. i am connecting to that
remote server by using VPN.
I want to connect that remote DB2 server instance using my local
machine DB2...
| |
by: ricolee99 |
last post by:
Hi everyone,
I have a problem that i have been trying to solve for awhile. I'm
given a code where the purpose is to create a general dataset mapper.
Given any dataset, i have a class,...
|
by: Dica |
last post by:
hi
does anybody know if it's possible to have a client belonging to their
domain authenticate against our server belonging to another domain? we want
to use something like integrated windows...
|
by: Angelo |
last post by:
Hi all,
I'm using a FileSystemWatcher to monitor a directory. I want the FSW
to pop up my already instantiated but invisible form.
However, I'm running into some problems with this.
1) In...
|
by: sanjayhire |
last post by:
Hi All,
I have just joined the forum.
I need your help..As it's very urgent...
How to identify a particular process is running on a server(Windows/Unix server) using VB program and since how...
|
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,...
|
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...
| |
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,...
|
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...
|
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: 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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |