I have my Tray application running as Background process in Win8
When I click for End task from Task Manager, how to get notified for End Task call. (which function is called??)
(In case of GUI application WM_CLOSE gets called but I couldn't able to trace for this.)
If a user fires up Task Manager and clicks "End Task" on your program, Windows first tries to shut down your program nicely, by sending WM_CLOSE messages to GUI programs and CTRL_CLOSE_EVENT events to console programs. But you don't get a chance to intercept TerminateProcess.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
A windows service; in that case, it would have an event that is raised. Should not show a UI.
A console application; would not show a tray icon
A windows GUI application; regardless of whether you show a form, it still is a GUI application. Keep a form open (something I'd expect from the Application.Run(formName) call) and make it invisible.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
Hello, I am writing a very simple app that is trying to launch a pdf viewer when a button is pressed or a selection is changed in a list.
I have the structure to generate an event when the selection is changed and I have the path to the pdf file; e.g. 'Assets/pdf/filetoopen.pdf'
I have been trying all kinds of methods without success;
StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
StorageFile pdfFile = await local.GetFileAsync((DetailsLongListSelector.SelectedItem as ContentViewModel).pdfLocation);
success = await Windows.System.Launcher.LaunchFileAsync(pdfFile);
That fails when using GetFileAsync.
I had thoughts about its due to access permissions and may need to copy to temporary storage before using, but I cant seem to make that work.
Is there any preferred method to open an pdf ?
OK I have managed to get it to launch by using:
// Get the app's installation folder.
StorageFolder appFolder = Windows.ApplicationModel.Package.Current.InstalledLocation;
// Get a file from a subfolder of the current folder// by providing a relative path.
StorageFile pdfFile = await appFolder.GetFileAsync((DetailsLongListSelector.SelectedItem as ContentViewModel).pdfLocation);
if (pdfFile != null)
bool success = await Windows.System.Launcher.LaunchFileAsync(pdfFile);
The main problem was I needed to use the ApplicationModel instead of Storage.ApplicationData.
Now I have an issue with Adobe stating that the file already exists "do you want to replace ?"
Is there any way to force Adobe to overwrite ?
I'm sorry Balu. You'll generally find that most people won't just hand over source code here on CodeProject. Obviously, if you're lucky enough to find an article that has the source then your luck is in. The forums, however, are not the place to seek source code.
I'm currently attempting to wire up to a MVC Web API that utilizes RSA encryption as part of it's authentication process. The RSA provider isn't available on a windows phone tech stack, and I'm wondering if anyone might be able to point me to some code/nugget package that handles RSA on the phone.
There is a horrible bug in Windows 8.1. Hibernation causes a desktop PC to crash. Now if you google you can find a solution, and that is to disable "allow this device to wake up the computer" in device manager for keyboard and mouse. However, this is only a temporary solution, because once you unplug either keyboard or mouse, the setting will be enabled again.
I tried looking to see if you can log a bug for Windows: no, you cannot. It seems like Microsoft know about this bug, but have no intention ever fixing it.
I'm not quite sure this is the appropiate place to start a discussion on this topic, since most posts seem to be related to programming.
I personally find the metro interface to be quite ugly even for a touch based interface.
If I compare it with my android's phone UI I find it lacks some rather basic features :
1. The ability to sort icons alphabetically , by frequency of use or according to an order I designate.
2. A quick way to switch / launch the apps I recently launched since I turned on my phone.
3. A Status bar
4. The ubiquitous navigation buttons at the bottom of the phone.
To me it feels like Microsoft is attempting to change my PC into a toy (with Metro). Which I despise, I typically embrace change in software as I'm a developer myself. But in the case of Windows 8 & Metro, I feel Microsoft was trying to hard to stay "with it", falling behind in the world of touch to Apple and Google. But guess what Microsoft basically defined what a PC is today, and you don't mess with a definition! I liked Windows for what it was, they should improve on the things that matter like performance, stability and compatibility with other systems.
I do not use ANY of the Metro apps, not even on tablets, they always seem half-baked and feature-lacking.
I find the recent changes in the Windows interface annoying and unpleasant. The biggest problem is changing both function and look in what has been defined and become commonly understood and accepted for years. This is not a new problem but keeps getting worse. I will not detail all the changes and their negative impacts but you know what I mean.
New is fine for those who are new and those who choose to change when they are ready. Forcing change on others is not good customer relations. Sometimes backward compatibility is provided to a certain extent but instead of being normal for previous users you have to search for it. This is NOT good customer relations!
I do not find the interface appealing as a new interface either! Treating a 4 inch display the same as a 30 inch display is STUPID! Forcing a desktop to work like a handheld is STUPID!
So many details! (heavy sigh) So much confusion...
Last Visit: 31-Dec-99 18:00 Last Update: 21-Sep-23 20:26