Using the narrator in C# windows store apps - c#

the narrator API (System.Speech) is not available for windows store.
Is there an alternative API or method for using this?
I found that there is a text-to-speech function as part of the Microsoft translator service, however since the narrator is already available, it would be silly to have to use this service for that, so I'd rather use it directly if possible.
I thought of maybe running a command through CMD.exe to text-to-speech something, but in windows store apps it's impossible to launch external processes, also I haven't found a command line interface for the narrator anyway.
Does anybody know of any method of doing this?

Windows 8.1 has offline text to speech support. Here's MSDN sample.

Are you trying to implement accessibility? If so, then this may be what your looking for:
https://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.automation.automationproperties
You can set the Name attached property to whatever you would like to have read.

Related

Receive calls Windows Phone 8

I am looking for events that I can subscribe to receive notification of call events (outgoing or incoming) on Windows Phone 8. Also if possible try to get outgoing\incoming phone number however I couldn't find any Windows Phone API for doing this. Is there any way I can do using C# or Native C++ on WP8 platform? Is there any Private API I can use to perform this?
One would wonder why you would want to do this..
However for obvious reasons Microsoft does not allow apps to get info such as incoming/outgoing calls. That is why you couldn't find any documentation for it. So the answer to your question is going to be a NO I'm afraid.

How to communicate with a separate application from c#

I have an .exe that runs on my computer. How can I connect to it from c#?
For example notepad.exe is running. I would like to write in notepad from windows form app or console app form. How can I do that?
Two suggestions:
either start the process using Process.Start()
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.start.aspx
or use SendKeys from Windows Script Host
http://msdn.microsoft.com/en-us/library/8c6yea83(VS.85).aspx
It depends on exactly what you want to do. Using SendKeys is the simplest solution but it's crude and limited in functionality. You can do more and better with SendMessage, but this will be harder to code.
Have a look at this tutorial. As far as I can tell, it does exactly what you are looking for. I realize it's in German, so just look at the source code.
Reading from another process in windows is problematic to say the least. We did some work on this a while ago and it involved hooking into the low-level Win32 API using assembly language. Essentially, it's really not pleasant and if you can avoid doing this you'll have a lot more hair on your head.
Using SendMessage would work if the application you are sending to understands the message you are trying to send to it. I suspect that you start to get into security problems with this on later Windows versions (Vista + Win7) and would have to run your application with elevated privileges.
Why do you want to do this?

how to start with windows API in .net

I want to work on windows API. I have an interest in creating network application that can communicate with web as well. I haven't thought any application yet. But before doing all this . I want to know where to start with. What all I need to start reading.
I have created lot of database interactive applications with window forms. But would like to start with this.
If you want to use Windows API methods from .Net, you'll need to use PInvoke to call them. There's a site called pinvoke.net that has samples for how you call many of the APIs so if you know which API you want to call, that's usually the best place to start.
For your use case maybe you dont need API at all. You could use the FileSystemWatcher .net class to react on any changes in a log folder e.g. It reacts on modify/add/delete of files.

How can I control my winmo phone?

I have been trying to find a way to control my winmo phone from my pc. (HTC S740)
What I want is to be able to call a number from an application, answer the phone from an application and hangup the phone from an application. It should also be able to track how long the ongoing call has been.
Any libraries out there that lets me make such an application with C#?
(The phone is connected to the pc via usb in Windows 7.)
You can use RAPI to invoke functionality on the device. You might need to write a wrapper.
I believe that this answer by ctacke should help you perform the task.
You can look at OpenNETCF library, which have many utilities to call native APIs that can help you, but i didn't hear of any library to help control your phone remotely.

How to read installer shortcuts with C# (WPF)

Background: I've decided to teach myself C# through WPF, and I'm writing a small application that needs to get a list of Start Menu shortcuts and their targets and store them. Basically, I'm trying to take all the shortcuts and put their target applications' paths into memory. However, I've run into a problem trying to read Windows Installer shortcuts (the ones that point to something like C:\Windows\Installer\{90120000-0030-0000-0000-0000000FF1CE}\wordicon.exe -- Microsoft Office is a good example of this). I did some research and it seems that Windows uses some behind-the-scenes magic involving the Registry to find the actual location of the file.
Question: How can I get the actual target of these Windows Installer shortcuts in C#? A lot of sources I've found point me to the IShellLink interface, but I don't know how to use it with C#. I'd prefer to use Windows API calls (or, even better, a .NET library) instead of manually looking through the Registry, but I'll take any guidance on the issue.
After doing more research, I found an easy answer here. It's basically using a combination of the MsiGetShortcutTarget and MsiGetComponentPath functions of msi.dll.
I'm afraid IShellLink IS the Windows API for using shell links! The Shell API is heavily COM-based.
But the good news is that COM interop works very well in .NET. This site is usually a very good resource:
http://www.pinvoke.net/default.aspx/Interfaces/IShellLinkA.html

Categories

Resources