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

How do I check how many windows are opened in Windows at the moment.

I want to write a VB.NET application to display current running applications
and total number of windows opened, however, I don't know how to start this
project. Can anyone give soem hints? Do I have to win32 functions?

Thanks,

Kai
Nov 21 '05 #1
4 1005
Kai,
I want to write a VB.NET application to display current running
applications and total number of windows opened, however, I don't know how
to start this project. Can anyone give soem hints? Do I have to win32
functions?


Yes, I am curious, is there a reason that you want to check that?

Cor
Nov 21 '05 #2
Kai,

"Kai Zhang" <ka*******@zeron.biz> schrieb:
I want to write a VB.NET application to display current running
applications and total number of windows opened, however, I don't know how
to start this project. Can anyone give soem hints? Do I have to win32
functions?


Yes, you can use p/invoke with 'EnumWindows'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3
Not really a serious reason. I just want to write a program to automatically
turn off the machine after all the applications and windows are shut down,
so I don't need to wait during the machine shutting down:').

BTW, my machine is S L O W.

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:OC*************@TK2MSFTNGP15.phx.gbl...
Kai,
I want to write a VB.NET application to display current running
applications and total number of windows opened, however, I don't know how
to start this project. Can anyone give soem hints? Do I have to win32
functions?


Yes, I am curious, is there a reason that you want to check that?

Cor

Nov 21 '05 #4
Thanks Herfried, I am not fully following what you suggested, but I will
Google "use p/invoke with 'EnumWindows'".
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uo**************@tk2msftngp13.phx.gbl...
Kai,

"Kai Zhang" <ka*******@zeron.biz> schrieb:
I want to write a VB.NET application to display current running
applications and total number of windows opened, however, I don't know how
to start this project. Can anyone give soem hints? Do I have to win32
functions?


Yes, you can use p/invoke with 'EnumWindows'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5

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

Similar topics

2
by: martijn | last post by:
Hi There, my vb app can open files. Well, actually my vb app launches word or excell to open them. These files are shared in a network. If somebody else has allready opened that file, you...
20
by: | last post by:
If I need to check if a certain value does exist in a field, and return either "yes" or "not" which query would be the most effestive?
8
by: Les Desser | last post by:
Is there any way to detect within A97 when Windows is trying to shut down, so I can close down the application gracefully? We currently have a trap in the main menu asking the user to confirm if...
1
by: Devhead | last post by:
i have an MS Word Document that i have created from an SQL server db and once created it is opened. If i try to create the same document with the same filename, i get an error. how do i check to...
4
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps...
10
by: sp | last post by:
The application is written in Visual Basic / .NET and working without problems under Windows XP, Windows 2000, Windows 2003 but it isn't working under Windows ME and Windows 98 - the computer...
1
by: Tom | last post by:
I have an MDI application in VB.NET. The main MDI window has a status bar, and menu bar. Child MDI windows are opened via the menu on the main MDI window. Now, what I want to do is add code to...
2
by: Kimmo Laine | last post by:
Hi! Is there a way to check if file is already open/used by another process? I know that i can do something like this to check it try { StreamWriter sw = new StreamWriter(filename);...
31
by: Nikos Chantziaras | last post by:
Hello. Is there a way to check if the current process has an stdin handle? In the win32 API, one can do: _eof(_fileno(stdin)) Crucial here is that the above doesn't block. Is there a...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
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...

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.