I've got a Logitech Attack 3 (Standard Joystick) plugged into my computer and have confirmed that it is working. Now given that, I need a way via C# (only C#) to read the axis (and buttons would be nice too) values from the joystick. I have seen many examples which use DirectX, but are from 8 years ago and no longer work with .NET 4.5...Hence, I need a .NET 4.5 solution that works on Visual Studio 2012. I have done extensive research on this and cannot find a way to get simple coordinates from a joystick. Any help would be appreciated. Thanks!
I have tried to use SlimDx, but have no idea what code to write.
Also, this: http://www.codeproject.com/KB/directx/joystick.aspx <-- this is from 2006, and no longer works with .NET 4.5 for some reason.
Those examples you've looked at should still be fairly correct. What has changed is the directX version and I think you should have a look at directX11 to use in your project.
Related
I am work with Sharpdx/C# - i'm wondering how Unity/UnrealEngine/CryEngine create their GUI for the Editor.
After some research i find "D3Dsurface" to work with WPF. But the Performance/FPS should be bad.
I cant believe all the engines (http://xenko.com - SharpDX engine) do their own GUI from scratch.
I tried to create a second Winform, it works but not the right approach for me.
best regards alex!
Xenko use this and so do I, it looks really good
Telerik windows forms are really good as they can be themed and tweaked to how you like.
Xenko like my self use the dark Visual Studio theme.
They have a free trial so u can get you feet wet before you go and drop cash on it, they also have a forum so you can ask for help and a few times I have seen them go out of there way to help.
Once you get your hands on the Dev pack you can modify the source and all sorts of cool stuff.
I have tried a few other windows forms controls but I settled on Telerik a few years ago and haven't looked back.
All in all I give them a 10/10 and they have some really nice CPU\RAM profiling tools.
I want to use DatagramSockets in a WP8 app to talk to an SSDP/UDP device (a Sony ActionCam) but I can't find the Windows.Networking DLL as it's not in any of the normal places you add references from. It does seem to live in various places on my Windows 8 machine but if I try to add it from somewhere like %Windows%/system32 it tells me it's not possible (which I guess because there's no Type Library?).
So can someone please tell me what I am missing? Is there some other SDK I need to download? I've looked all through the MSDN docs and though it mentions the namespace in plenty of detail it doesn't tell me how to find or add it for a WP8 app (typical MS).
Hope someone can help me - I'm clearly missing something obvious but I don't understand what or why.
Ok, I solved it - I have absolutely no idea why this was happening but it seems like VS2012 was the culprit. In desperation I saved the code I needed, deleted the entire solution and recreated it and now I can see the Windows namespace members.... bizarre! Also very, very annoying - I have wasted hours on this, apparently all because of some internal issue with VS2012.
Thanks for your input Tico, apologies if I wasted your time!
Just to follow up on this - I had the same issue. For me, I had to select .Net Framework 4.5 instead of 4.0. Creating a new solution in 4.0 within VS2012 wouldn't allow access to the Windows.Networking library. But 4.5 worked perfectly.
Just another idea of what might have gone wrong since i myself stumbled upon that mistake right now. Instead of a windows phone class library i added a portable class library (supporting windows phone 8 and windows store 8+ with .net 4.5). Seems like that combination doesn't support Windows.Networking
I come from two distinct backgrounds: I have much experience with WPF/XAML/C# app development and equal experience with C++/DirectX development. I hear about the ability to use DirectX and XAML together and I get all excited, but now I have hit this wall.
I'm trying to use the SwapChainBackgroundPanel in a WPF application. But I'm trying to use C# as the underlying language. I keep running into issues where, regardless of the type of C# project I create (PCL, WPF, Windows Store) none of these types are defined [namely I've been looking for SwapChainBackgroundPanel and some other DX stuff like the device and etc.)
So my question is: how does this work in C#? I've seen the simple shooter example from the MSDN done in C++ and it makes sense; I get it. But I feel like I'm missing one of those "gotcha's" when trying to do it in C#.
Any advice, or maybe a link to an example, or at best a little tutorial on setting up a C#/XAML/DX app would be amazing. Thanks everyone.
There is no SwapChainBackgroundPanel available to a WPF app (that is in PresentationCore). The closest you are going to get is the D3DImage class, but it's not exactly the same. See this discussion.
I don't think you can fully utilize the DirectX capabilities of a Windows 8 Store app (SwapChainBackgroundPanel) from C#. You're going to have to do your DirectX work in C++ as in the example you described. You can certainly combine the three (Xaml, C#, C++) as in this example, but I don't think a 100% C# app is possible.
The answer is wrong. It is possible to fully utilize C# throught a wrapper.
I did this myself with SharpDx which is actually one of the microsoft recommendations to use DirectX in C#.
As for the choice of XAML Library, Universal Windows App 10 or Windows Store App 8 is the way to go. Use a SwapChainPanel instead of SwapChainBackgroundPanel.
Having searched high and low for native c# hook to webcam, I found 5 basic ways to interact with the camera.
Video for Windows (VFW)
DirectX
avicap32.dll
WIA
3rd party tools
My requirement is to take a photo. The application will be used on some legacy windows XP and Vista machines, but going forward Windows 7 and greater will be required. So what might the best approach be with the broad install base? Just reading WIA looked like the way to go but looks like some changes were made so it works a little different now (I don't know for sure). I understand that some people have done combos.
Might need to crop photo, but that is really about it.
For school visitor monitoring.
I think the best thing is to use the WIA. I know a third party toolkit that could help you doing your requirements which is leadtools. You can check this Tutorial
I would always try to pick up something already on the web and tweak it to my own needs... some open source project or an example where the mainly portion of my app is already made.
on Codeplex you can find a nice library to work with webcams and it's simply called
WebCam Library for WinForm and WPF with C# and VB.NET
Give that a try, maybe you can even help the project, by contributing your own findings, and everyone is a winner... isn't Open Source a great idea?!
This question already has answers here:
Graphics Card and XNA 4.0
(3 answers)
Closed 2 years ago.
My problem is that I have written code in Visual C# for a background for a game that is part of my grade in a class. The background has multiple layers moving at different speeds is how I modified some code... I did this in 2008 version with XNA 3.1 and it worked fine and the background ran like intended. But when I went and ran the exact same code in the 2010 version on XNA 4.0 this error message appeared that states:
"No suitable graphics card found.
Could not find a Direct3D Device that supports the XNA Framework
HiDef profile.
Verify that a suitable graphics device is installed.
Make sure the desktop is not locked, and that no other application is
running in full screen mode.
Avoid running under Remote Desktop or as a Windows service.
Check the display properties to make sure hardware acceleration is set
to Full."
I understand that is says I need a better graphics card,but i was confused at the fact is worked in 2008 easily... so I went and change my setting to try and fix the problem to no avail. Is my graphic card not good, even though it worked in 2008 consistently? Have anyone else encountered this message and if so how did you fix it? I am wondering how do I make it so that I can run the said background in 2010 version. Appreciate any assistance...
There are many breaking changes between XNA 3 and 4. I would finish out the project in 3.1 if I were you. In 4.0:The HiDef profile requires DX10 hardware. The Reach profile supports older hardware.
This covers how to get to the older profile and what is covered by it.
Link
You need to have a better graphics card... Xna 3.1 uses Shader version 1.2 and Xna 4 uses shader 3 version. Your card doesn't support the correct shader version.