::How-to close all active windows on windows session
::PUT THIS TEXT INTO A BATCH FILE WITH FILE EXTENSION CMD OR BAT
::IF YOU DON'T KNOW HOW DON'T PLAY WITH THIS ;) ...
@ECHO OFF
ECHO CLOSING ALL THE WINDOWS EXCEPT THIS ONE ARE YOU SURE ??!!
ECHO ANY UNSAVED DATA IN OPEN ED PROGRAMS MIGHT BE LOOSED ??!!
ECHO.
ECHO HIT ENTER TO PROCEED WITH CLOSING , CTRL + C TO CANCEL
ECHO.
ECHO THIS BATCH FILE REQUIRES THE CMDOW COMMAND LINE UTILITY
ECHO DOWNLOAD IT FROM http://www.commandline.co.uk/cmdow/
ECHO PLACE THIS FILE IN YOUR PATH , CREATE SHORTCUT TO IT
ECHO PUT THE SHORTCUT ON THE DESKTOP , RIGHT CLICK , ASSIGN SHORTCUT TO IT ...
PAUSE
:: find the Handle of the window of this batch file
for /f %%l in ('cmdow @') do set c=%%l
:: FOR EACH OPEN WINDOW IF IT IT IS NOT THE NANDLE
:: OF THE CURRENT ONE CLOSE IT BY KILLING ITS PROCESS
for /f %%i in ('cmdow /b /t') do if not %%i==%c% cmdow %%i /END
::ENABLE THIS LINE BY REMOVING THE :: IN FRONT IF THE TASKBAR DISAPPEARS
::cmd /c explorer.exe
::ENABLE THIS LINE BY REMOVING THE :: IN FRONT IF YOU WOULD LIKE TO SHUTDOWN YOUR PC
::shutdown -f -s -t 00
Getting the Current TabItem when the Tab is not selected in WPF
-
[image: Banner]
This is a quick reminder to self on how to retrieve a TabItem from a WPF
TabControl *when the tab is not currently selected* because I ru...
1 week ago
No comments:
Post a Comment
- the first minus - Comments have to be moderated because of the spammers
- the second minus - I am very lazy at moderating comments ... hardly find time ...
- the third minus - Short links are no good for security ...
- The REAL PLUS : Any critic and positive feedback is better than none, so your comments will be published sooner or later !!!!