first of all I want to tell you that I've searched a lot, and this is not Duplicate question.
My problem is that I want to capture windows events (SystemEvents) when triggered but from windows service application. I've followed this example http://msdn.microsoft.com/en-us/library/microsoft.win32.systemevents.aspx. It says that services need to have message loop (MessagePump in the above example) to process all of these events (Login, logout, power events etc.). The problem is that this example is working great under Windows XP, but for Windows 7 none of these events is caught.
Does anyone have solution to this problem ? I read somewhere that I need to use SENS (System event notification services). Can you point me into the right direction? Thanks.
I've found the solution myself. SENS is unusable under Windows 7. WTS Api is the key. If someone is interested i can post the solution. Thanks anyway :).
Related
I'm currently researching on how to mute the windows 10 notification but it i havent found any concrete solution yet.
What i want to do is to disable all notifications when i press a button or check a checkbox.
It is similar on what you do on the notification settings, but i want it to do it progmatically on my application.
I'm currently reading the document of microsoft about Notification Listener.
https://learn.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/notification-listener
NotificationListener allows you to access the notifications, but not to the configuration of the system. And you must think it's a UWP Api...
You want to do something that can not be done in UWP Api(impossible) nor WPF(possible, i wish you good luck).
You can't change system settings inside the UWP app box -safety and things-. The way to do it is "Open the Configuration App where you want the user make the change".
If you wan't to this in WPF/.net you'd have to play with PInvoke and WinApi seriously. And that means thinking about privileges, run as admin, find the functions in WinApi .h files, etc...
Keeping simple, in UWP, nope; in WPF, you have to read a lot of source code/documentation of Windows .h files, make the c# version of the structs, etc...
The real question here is... It's necessary? Windows provides Focus Assist with two clicks (corner, Focus Assist)
I really appreciate your feedbacks! I did some tinkering and found out the service responsible for the notification. I'm not really confident that this is the best approach, but it is working for me.
What I did was I stopped the service using C#. Here is my sample code:
ServiceController[] services = ServiceController.GetServices();
foreach (ServiceController service in services)
{
if (service.ServiceName.Contains(serviceName))
{
service.Start();
}
}
Here is the service responsible for the notifications:
Notification Service
I dont know if this is a good practice or not so I'm still open for feedbacks and suggestions.
Thank you!
Currently I am working on an application in C# for my Raspberry Pi 3 with Windows 10 IoT. I selected "Blank App (Universal Windows)" when I created the program (I was following a tutorial of the Microsoft Dev Center). Since then I ran into some problems.
First the timer directive wasn't available. (using System.Timers)
I tried to import a new System.dll but VS won't let me do that, because there is already one implemented. So i thought maybe this is just a thing for this kind of application I choose at the beginning. Does anybody know why I can't find the timer class?
But know to my main problem:
I would like to click on the ellipses on my user interface. While googling I noticed there is no click event for the ellipses, but there must be a MouseUp or MouseDown, but it looks like my program doesn't know these events...
If anybody knows an answer for my problem, thanks in advance.
(I would like to bypass the solution with creating a button and then shape it like an ellipse because I would have to do that for 72 ellipses in my application and I am to lazy to do that ;-) . But if there is no other way i will have to do it that way)
And if anybody needs more information, please feel free to ask.
Thanks,
Heenne
I've searched for it ,but I can't find the answer.
what I found is that how to keep the screen alive.
I wanna try to write the uwp that
when I click a button ,the screen will be turned off.
is there any function?
thank for any reply!
The answer is NO. You cannot turn off the screen from your app.
Microsoft will not allow application to do so. The API won't support this. Even if you did it with some hacks such app will be removed from store.
There's an answer about your question in StackOverFlow:
Microsoft certification will not allow application to do so, even
though if your able to do with some hacks. You cant turn off the
screen from your application. This type of app cannot be made for
Windows Phone, the API's do not exist, and if someone found a
workaround it would be removed from the store. Unfortunately non of
the developers have developed such app for windows
Please let me know the answers to the following:
Is it possible to programmatically fire the touch and gesture events of Windows 7?
Is there any API?
Is it possible to fire the event from a computer without touch screen?
I am looking for something implemented or implementable in C# if possible.
Any help will be much appreciated.
Thank you.
In the Windows 7 pre-beta handed out at PDC 2008, there was an API for injecting gesture input into the input system. However, the API was removed before RTM, and I have it on good authority that this is not a supported scenario for Windows 7.
Is there a way to make Windows Mobile not use the main phone app? I have my own phone app that I want to handle phone transactions for a business device.
My app works fine (detects the call and can hang up), but the main phone app still wants to allow the user to answer a call normally. I can try to hide the incoming call window or programmatically press the ignore key, but that is a bit clunky.
Basically, I need a way to make the built in phone app not know about incoming calls.
Any advice would be appreciated!
In case it matters I am using a Symbol MC70 running Windows Mobile 5.
Thanks!
EDIT: Thanks to djhowell's answer to this question I now know that the offending app is cprog.exe. But apparently it is hard to kill because services.exe keeps bringing it back.
First of all, you should not do it. Replacing system dialer will create you more troubles than you can expect.
If you still want to do it, there is no nice way to do it, even if you opt to use RIL directly. So, there is a trick in which you create a dummy cprog.exe (which does absolutely nothing), and put in the root folder . After the phone boots, that program will be started instead of the native one that is located in the \Windows folder. Then no program will be listening for incoming calls.
I would recommend asking Symbol (actually Motorola), they may have insight into your problem. I work with MC3090's and they were helpful before.