I have searched the XNA Media.VideoPlayer library. It has no direct method for setting a time, but MediaPlayer has a Position to set playing position.
Is there any indirect way to set the time?
In classic Microsoft style, this simple, yet necessity feature is not available:
Thank you for the suggestion and the spirited commentary. While we understand that this capability is important to you, we are not planning to add this capability to the Windows Phone developer platform. - Cliff Simpkins (Sr Product Manager, Windows Developer)
If you're trying to do this for PC, you might be able to use this workaround.
If you're going for Xbox or Windows Phone... Sorry!
Related
Windows Sound mixer/settings can set the microphone to play over the speakers. I'm looking for a way to do that through C#. I'm assuming there is a DLL reference or .NET call that might be able to.
Everything I've been finding invariably goes back to streaming, which I don't want to do. Unless that's whats actually happening under the hood when changing the audio settings in windows.
If it helps, I'm using C# 3.5 (Unity App) and running on Windows 10 latest.
Thanks!
You can do this with Core Audio APIs link
For implementation you can refer
https://blog.sverrirs.com/2016/02/windows-coreaudio-api-in-c.html
Short backstory, I need to create an App for my computing coursework, and since I'm quite the procrastinator I wanted to make an app that shuts down processes that users waste time on.
Therefore I looked up how to make Windows 10 apps and stumbled across Microsoft's own "C# Fundamentals for Absolute Beginners" and "Windows 10 Development" for absolute beginners. I spent over 20 hours watching these videos over the past few weeks.
Now I have designed nearly all the UI in XAML over the past few days and now when working on the Code behind in c# I noticed that System.Diagnostics.Process could not be found, I tried to work out why and eventually stumbled across this answer which made my jaw drop (TLDR it's because it's a UWP app): Missing reference to System.Diagnostics.Process
I do not need my app to run on the Windows Store, all it needs to run on is my computer however messy the solution may be, but I really need access to that class to shutdown processes. I really want to make the app in C# and XAML though and I'm not sure if I can do this whilst having access to the System.Diagnostics.Process class.
I am really running out of time for this project and I can't just change my idea as the problem definition essay has already been marked, etc and that would take forever to rewrite.
I am open to the idea of just writing the application fully in C# if there's really no way I can use XAML without making a UWP app. But I'm not sure what's the easiest way of doing this/what project type so any help would be appreciated.
I feel very angry at Microsoft for not making it clear that "Windows 10 Development for absolute beginners is" actually "Windows Store Development for absolute beginners". I do not want my app on the Windows Store so if I could force reference the process class that would be great!
You need to develop a Desktop app (WPF). With WPF you also use C# and XAML, however you can use all .Net Framework.
UWP (Store apps) need to run in devices like Surface RT (Windows RT), Lumia 920 (Windows 10 Mobile), XBOX and Hololens so they use only a part of the full .Net Framework (they use the .Net Core Framework). UWPs run in a sandboxing so they usually don't have access to system APIs (low level access like create a IP package). In this case you should use WPF.
Your problem is one of the reason, I think that StackOverflow use the tag uwps and win-universal-app.
When I create new Windows Phone project I have an option to create a "Windows Phone" or "Windows Phone Silverlight" app. I know that they have different runtimes and different APIs.
I was under the impression that Microsoft wants to unify Windows and Windows Phone platforms so why is there even a Silverlight version? What benefits does it bring?
Also, if I want to create an app just for Windows Phone and never have plans to bring it to Windows, what should I choose, Silverlight or Windows Phone?
I'd suggest you go with "Windows Phone" (non-Silverlight). It's the new API, which works for both Windows and Windows Phone. At some point you may want to port the app or create a new one for Windows and you'll already know the API (and porting will be way easier). Also, the new API will most likely get more updates and features added, and at some point you may even be forced to update to it (either because the old one is no longer supported, or because it does not have some features that you need).
As it was said in the other answers - the Silverlight option is there only for backward compatibility and is likely to be phased out in time. That is - it's good if you already know the API and have many libraries (yours or others) for WP Silverlight, but if you're just starting - you'd better go for the new technology.
Edit
There is one other thing to consider before choosing between the two types of apps. Some features are only available in a Silverlight app, and others (smaller amount) - only in a Xaml app. Here's an article with some info on the differences: Migrating your Windows Phone 8 app to a Windows Runtime XAML app
Windows RT Xaml is quite new and People have to generate some knowledge first.
Silverlight for phone has been around for years and there's a load of tools available: Phone Toolkit, diverse Controls, etc.
Just killing it off would have hurt many developers who built up intellectual property over a long time forcing them to start over.
When starting a project with Silverlight you will have more things around that help you get stuff done.
When starting with WinRT Xaml, you will have better performance, but will have to figure a lot out by yourself.
So the Silverlight option is there to not throw of Silverlight developers.
I recently started a new project on WinRT Xaml and my experience was that I had to recreate a lot of common tools like Caches, etc. But also a lot of things that were in Toolkits previously are now part of the platform itself. Also, when moving over to Windows 8, you get to share a lot of code which is nice.
Unifying the environment(s) would be ideal. In my opinion, it hasn't been very successful. At one point in time, you could only develop under Silverlight, so what you are seeing is just a newer version of the same thing to keep backwards compatibility as well as to keep Silverlight's developers happy. In the future, it will probably be phased out. Plus if you want to support older Phones, Silverlight is basically your only choice (you'll be surprise, how many WP users haven't updated their 8.0 to 8.1)
There really isn't any other real benefit of Silverlight other than maybe the Windows Phone Toolkit which has been tremendously useful (you can see how many SO's answers rely on this simple addon). Once the universal runtime gets fleshed out to the point where the documentation reflects what's actually available -- then I think it would be the default project for developing in Windows going forward.
If you're just starting, I would use Silverlight the knowledge based is much greater. After you get use to the WP environment then switch to runtime.
Im trying to create a media player (in C# .net 4.0) that will work on windows XP (SP3), vista and 7. Normally I would just go the easy way and use WPF's own MediaElement, but since that relies on Windows Media Player 10 or newer, that wont work as Windows XP SP3 may only have WPM9.
First I tried downloading Jerimiah Morill's WPF MediaKit sample application, but this used the EVR which wont show on my test machine (a Windows xp SP3 only with default codecs and default programs, plus the various .Net framework installations). I also downloaded the binaries and tore these apart, creating a new project only with reference to the DirectShow-dll and the bare minimums from the WPF mediakit, this time with no reference whatsoever to EVR. Still no luck. This i'm having a hard time understanding - should'nt even Windows XP be able to play movies using VMR stright out of the box?
I found some samples of media players where one of these works. This one is called DxPlay and uses directshow's graphbuilder, but is built in winforms, has some rather raw-looking code, and will not scale, seek, handle audio, and in general seems rather sketchy.
So, Is there any easy way to create a media player that will play on all the mentioned platforms without pushing WMP10+? I had high hopes for WPF MediaKit, but something is preventing it from playing on Windows XP SP3 (any solution to this would be very interesting).
Thank you very much in advance!
-ruNury
I would try to wrap VLC media player in your .Net project.
Here are some .Net projects that might help you:
http://vlcdotnet.codeplex.com/
http://sourceforge.net/projects/libvlcnet/
http://www.codeproject.com/Articles/109639/nVLC
MSDN suggest EVR (Enhanced Video Renderer) for video output in systems where it is supported: Windows Vista and later. With its introduction, its predecessors - Video Mixing Renderer filter (versions 7 and 9) were cut on smooth scaling of video. Video Mixing Renderer 7 is also less capable in terms of customization, however it consumes far less resources (does not use Direct 3D) and you can output way more videos at once.
Your standard solution here is to support both VMR and EVR output and use the latter starting Windows Vista, fall back to the former otherwise.
EVR is "unofficially" installed in Windows XP with .NET runtime and can be used with an instantiation trick: you the respective DLL is not COM registered and you cannot create an instance using CoCreateInstance API, however you succeed if you do CoLoadLibrary, DllGetClassObject and friends.
For C# development you typically consume DirectShow through DirectShow.NET Library.
i m developing a little tool on my Pocket PC using WM6 SDK but i would like to implement a finger friendly user interface (iphone-like).
So i m looking for a free .NET framework that offers the possibility to easily integrate a finger friendly interface for Windows Mobile 6 Pro .
Any ideas ?
EDIT : Finger friendly means big icons, big buttons , scrollable screens with a simple touch of the thumb... Because the Winforms in Compact framework are made for the stylus, not fingers !!
I know of no such interface API.
I would code such an interface from scratch, overriding Paint and mouse events. If you need more fancy drawing tools that compact framework provides, you should look for pinvoke to access GDI+.
You should really check out Resco's MobileForms Toolkit 2009.
I bet their controls are exactly what you are looking for. Plus they have a whitepaper and videos to show off the controls.
I am not sure it is what you are looking for (I didn't have time to examine it yet myself, but I definately intend to); this UI Framework looks interesting:
http://code.msdn.microsoft.com/uiframework
Check out the Fluid windows mobile controls available at http://fluid.codeplex.com/
This might be what you are looking for, and its open source.
Any current readers on this thread should check out SlideUI (http://www.devslide.com/products/slideui). It's a current (and supported) product which offers touch friendly (iphone-like) scrolling and controls.
I'm not entirely sure what you're asking here... Windows Mobile 6.0 Pro is touch-screen enabled, so you should simply have to create your project targeting the Windows Mobile 6.0 Pro (note, however, that your application will not be compatible with Windows Mobile 6.0 Standard devices).
I know exactly what you are talking about. All the .NET Controls are designed for the stylus. When you make them bigger for the finger, there is no guarantee they will respond well. Add to that every hardware devices sensitivity is different and its even harder.
I recently built an application attempting to incorporate some touch like functionality. it was a pain having hand code all this stuff.
The problem with a 3rd party library, as opposed as coming in Windows MObile is then everyone is designing their own library and navigation techiques. Hopefully MS will wise up on this front.
http://sites.google.com/site/nebowiki/
If you are developing finger friendly apps, your target device needs a process to handle finger input as opposed to the stylus. HTC devices (Such as the Kaiser, Mogul, Touch Pro, etc.) use TouchFlo for this purpose. There are a few different versions of TouchFlo and I'm not sure if there is an SDK, but you need to incorporate it into whatever you program. xda-developers.com will have lots of info about it.
It IS amazing that with WM6.1 Pro, .NET CF 3.5 and VS2008 that all we have available are the basic stylus-sized controls that are are spartan in the extreme. i.e., coyote-ugly. I'm about ready to chew my hand off rather than use them in an app.
So where is the third-party collection of controls that all WM developers are flocking to, to provide touch-friendly apps?
Ugly is truly the correct word for most (mine included) mobile win apps.
I am developing for an older piece of hardware with a mono screen which makes it even worse.
Take a look here:
http://www.windowsfordevices.com/news/NS9328208835.html
and here:
http://msdn.microsoft.com/en-us/library/dd630622.aspx
This is not free, but it is affordable - some of the screen shots are pretty nice looking:
http://www.basic4ppc.com/?gclid=CIiO1di1nJoCFRAhDQodYX8-9A
Anyway...sorry if this was just googledragging - maybe it had something you had missed.
--Joe
Finger Freindlyness is a result of the touch screen technology (capacitive screens are less accurate, but require zero pressure; resistive screens require physical pressure and are harder to swipe, flick, etc.)
With Windows Mobile 6.5, they have introduced a system gestures library (and if you'd rather not have to P/Invoke it, there is a sample wrapper on MSDN Code Gallery). Theoretically, it would be possible to write to this new library, and maybe emulate the gestures on pre-WM6.5 devices, if required.