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?!
Related
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.
I need to develop a C# touch-screen desktop application with a "modern good-looking" UI.
How would you approach it? I´ve got in mind using Flash (just for the UI) or WPF... but i´m open to any idea or any third-party C# UI you´d know.
Is Flash easy to integrate with C#?
Thanks for your knowledge!
You should look for a AMF remoting library in C#.
Remoting is when you call a function on your server from flash.
AMF (version 0 or 3) is a binary format used to encode object transfered
between client and server
Weborb and fluorine are solutions for this.
see : .NET and AMF
You will probably be doing well with a third party framework to avoid the overhead of writing user interactions, controls, etc.
A couple of options are
http://xamarin.com/
http://www.resco.net/developer/mobileformstoolkit/
A review of these options is provided here.
I recall combining a flash interface with a C# back-end back in university. There's a method called fscommand() that will take a couple of string parameters (I may be mistaken, read up on it) to pass to and from the interface and the C# "code-behind".Flash is an ok option, but if I were you I'd opt for a WPF interface. I'm a huge fan of the telerik libraries, their WPF one allows you to create the most modern-looking interfaces and dashboards. Not to mention that the skills you will acquire while learning enough about wpf will be hugely beneficial in your career as a developer the way things are going (depending, obviously, on what direction you're heading).
FlashBuilder 4.6 has some nice functionality for quickly building a UI that work on a desktop or mobile device. You could use FluorineFX (free) or webOrb on a webserver to send data back and forth to a database server if that were needed. If you build it with the Flashbuilder 4.6 mobile project template, it would work on a iPad, mac, windows pc, or android device as well. Since a pc touchscreen should use the same type of finger gestures as a mobile app, this might be a nice way to go. (I don't actually have a touchscreen on my pc, but it runs well with a mouse, so I'd assume it worked with gestures too).
Adobe.tv has lots of examples of building a mobile app project (Which also runs on a PC) and there is a Flashbuilder 4.6 free trial.
http://flex.org/
I'm rebuilding an Embedded application:
Prebuild application Specifications:
Use : For dispaying the captured images/video from microscope image capturing device on windows based PC or Laptops.
Sepcifications: Prebuild on .NET plateform using VC++
Flaws : Lacks some specified features.
Current Requirement:
Want to rebuild that entire application using C# and add some additional client features.
My Questions:
Is it feasible to develop such application in C#.net?
If yeh,What kind of resources available in C# to develop desktop embedded application?
Any references which show any of such kind of application?
Your suggestions on building this kind of application.
P.S. It is essential to buid it on .NET platform.
I think by "Prebuild" you mean "Existing". Why do you want to rewrite the complete application? As you have stated that the application is written in C++.Net. You can easily add all the new functions in C# and use that code from your existing C++.Net code.
Note: I'm making this answer CW because the question is hard on the limit towards some close reasons. Everyone feel free to edit and extend it.
Is it feasible to develop such application in C#.net?
That's a tough one...from the top of my head I'd argue that it doesn't matter. If you know C#, then build it in C#, if the client wants it in C#, then build it in C#. You'll most likely have to use COM-Components or API-Invokes anyway to accomplish this.
If it is a TWAIN device, you might be better of to stick with VC++, I found TWAIN on .NET a real pain in the a** and have given up on such features. Same goes for WIA, but that might just be me.
If yes, what kind of resources available in C# to develop desktop embedded application?
I guess you mean a Widget? In that case I have no idea, I never really looked at that (at least not on Windows). But as far as I know widgets on Windows consist of a data-backend and a HTML/JavaScript-Frontend, so you'll most likely have to develop the two separately.
Any references which show any of such kind of application?
I guess any WIA/TWAIN application would be a reference, at least your description sounds so.
Your suggestions on building this kind of application.
See your first question.
I am planning to develop a UI control suite (open source) on .net because there is hardly such things as free or open source out in the market. But I am not really able to decide the following factors before going into design phase:
Should I write it for Winforms only?
Should I write it for WPF only?
Or, should I write it for both?
Which one would be more effort effective in the long run and help the community better? Can you guys please help me to sort this things out?
'Writing it for both' is basically 'write it twice', as I can't imagine much would be shared.
I think if I was suddenly filled with the idea that the world needed yet more 3rd party controls, I would write them for WPF/Silverlight/WP7.
WPF, but it's just my opinion.
Windows OSs that are supported (XP, Vista, 7) all support it, and WPF is the future. I don't see Winforms' death in the proximity, but we should support things that are right now actively supported.
It's like developing for IE6 instead of Firefox/Safari/Chrome/Opera. Most of us don't see IE6 dying, but we have to move forward.
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.