Win CE 7 application development - c#

I have requirement that we need to develop a rich UI application(similar to WPF or silverlight). The target device is having embedded OS Win CE 7. how can i achieve this, after so much R&D i got to know that
1. we have to user Silverlight for GUI and C++ as backend coding
2. we can create the MFC application using some third party SDK we will not be able to get rich UI
Also, i read that we can add components in WIN CE 7 for compact framework.
Is my above understanding correct, can someone throw some light on this?

Just to add my 2 cents to Chris and Paolo's replies, if you are not building the OS image for the target device or, at least, can't control the features it supports, your choice may be limited by the set of components that were included into the OS image provided with the device.
Windows CE is highly componentized and both the badly named "Silverlight for Windows Embedded" (XAML) and .NET Compact Framewor runtimes can be left out of the OS image to save storage space and memory.
The XAML runtime can leverage graphic acceleration (if the HW you are using provides it and the BSP includes drivers to use it, of course) and this may lead to a more responsive system, compared to a full .NET implementation.
I would also try to stay away from MFC for new implementation. The only good reason to use MFC is that you already have an UI framework that fit your needs and is based on it.
Currently on CE you can decide between an easy to design and rich UI with complex to develop and debug code-behind (XAML) or an easy to develop .NET application with an ugly windows 95-like UI that require lot of work to be "beautified". XAML in the hand may merge the best of both worlds (requiring additional cost and two heavvy runtimes on your target, but this may not be an issue if you have a powerful x86 machine or a graphic accelerated ARM Cortex).

To develop application on WEC 7 you need an SDK built from OEM that give you the target board.
If you want to develop on a Virtual PC image you need Platform Builder to use CEPC BSP and create an O.S. image and the corresponding SDK.
After that, you can develop using Silverlight only with C++ but you can use .Net Compact Framework and managed code for Windows Forms development.
Paolo.

It really, really depends on both your definition of "rich" and the graphics capability of the hardware you're targeting.
CE 7 supports the .NET Compact Framework. Many people will say that you can't do "rich" UI in the CF, but that's not really true. You can't do it with the standard controls, but if you do your own custom control drawing, you can do pretty well. Yet, it's a lot of work, but it can be done. The limitations here are in alphablending (not fun to get working) and animation (also not fun), but with dedication you can work around many issues.
CE 7.0 also supports "Silverlight for Windows Embedded" (a.k.a. SWE). First thing to know there is that it's really not Silverlight. It's a XAML rendering engine, but any other Silverlight assets you might have won't work with it.
SWE supports only C++, though since it is COM based, it can be wrapped in CF classes and then used from managed code. I've seen a couple of companies do this, and one even offers it as a product.
MFC is available, but since MFC was crap even 10 years ago, I definitely wouldn't use it today. If you want to use C++ but not SWE, there are better options than MFC. STL and WTL come to mind for windowing apps.

Related

Difference between WPF and Flex

I am a WPF developer and few days ago I came to know about Flex. Now,I got Following list of questions.
Both of them to be used for creating rich GUI application. So, are
they competitors to each other.**
If both are to be used for same purpose, then which one should be preferred.**
Moreover, I was also wondering that WPF is based on DirectX for rendering as
it does vector-based rendering, but at the same time I am also keen to know
that How Flex renders, Flex is based on what??**
Does Flex can also use GPU based rendering... Is there anyway to use Shader in Flex.**
I am very much confused about Flex, because I am very new to Flex........So, Please clear my doubts, as I might be having totally incorrect perception about Flex
1 Both of them to be used for creating rich GUI application. So, are
they competitors to each other.
Only to a certain extent. As far as I know WPF can only be used to create windows-based applications. Flex' initial primary target was the web and most Flex applications were so-called "Rich Internet Applications".
Later Adobe created AIR, which is a virtual machine that lets you run the same applications on the OS itself, often by reusing 99% of the code that was written for the web apps. Some API's were added to access native functionalities of the OS (client-side database, file I/O, running/accessing native processes, etc.). AIR applications can be deployed on Windows, Mac and Linux alike, though development of the AIR vm for Linux has been stopped.
The last step in this story is that AIR applications can now also be packaged as apps that can be deployed on mobile OS's. Again because it t
runs in a VM, this offers a "write-once, deploy-everywhere" solution. Both Android and iOS are supported (not sure about BlackBerry but who cares). On the Flex side of things, some mobile-specific UI components were added to the framework.
2 If both are to be used for same purpose, then which one should be preferred.
The choice is entirely up to you and depends on factors like knowledge about the framework, specific requirements that you might have, etc., etc.
3 Moreover, I was also wondering that WPF is based on DirectX for rendering as it does vector-based rendering, but at the same time I am also keen to know that How Flex renders, Flex is based on what??
Flex is a framework that compiles to ActionScript which in turn compiles to abc bytecode. That bytecode will be interpreted and run by the Flash VM.
The roots of Flash lie in vector-based rendering (it was the solution to render vector graphics on the web for the two previous decades). All stock graphics for the Flex UI components are thus vector-based.
4 Does Flex can also use GPU based rendering... Is there anyway to use Shader in Flex.
GPU acceleration has been added to the Flash/ActionScript API somewhere in the last 5 years, but because the Flex framework was created long before that, and porting it to the new GPU-accelerated system would be too complicated, Flex does not benefit from that evolution.
But you can use a Flex UI side by side with GPU-accelerated components. You could for instance create a normal Flex application with just one component that renders a 3D model that kind of lives outside the Flex display list.
Usually only games written for the Flash VM do leverage the GPU acceleration. Most of them use the Starling framework. For mobile UI's you also have the option of the FeathersUI framework, which provides a GPU-accelerated mobile component set on top of Starling.
Note that #Vinodharajan's answer is not entirely correct in that the Flex framework is no longer property of Adobe. Adobe donated it to the Apache foundation about two years ago and it has been evolving there ever since.
Flex is a Adobe base front end product. This internally uses Flash to render its content on the browser or Adobe Air for standalone application. This can use hardware rendering. You can just think this as a alternate from Adobe for WPF.

Best Windows language for multitouch and large bitmaps?

I will be developing an interactive application, involving multitouch, several layers of large bitmaps, and video playback. The screen resolution will be fairly large (1920x1280).
For several years, I have developed interactives in Flash, iOS, and OS X Cocoa. However, this project must run on a Windows box, so iOS & Cocoa are impossible. Also, I'm concerned about performance in Flash, since there may be 3 videos playing simultaneously, and large bitmaps moving around.
I know little about the technologies available on Windows. I'm investigating Silverlight, C#, Unity, Processing, and Java. If anyone can offer advice, it will be greatly appreciated.
You seem to be investigating several technologies on different levels:
C# and Java are programming languages. What you prefer may depend on your existing skills, but C# is from Microsoft so chances are that you will experience less friction using this language if you develop for Windows. Picking the right programming language is an important decision.
Silverlight is a "technology stack" from Microsoft. It enables you to develop XAML based applications that run in the browser. Compared to the native WPF stack it is less powerful. Choosing Silverlight, WPF or another technology stack like Processing.js is an important decision.
Unity is a dependency injection container from Microsoft. You can use this or any other suitable container if you like. Or none at all. You don't really have to think about this until you have made some of the more important decisions about your project.
Personally, I don't have experience with the type of application you describe, but I would go with C# and WPF. WPF has some support for multitouch on Windows, and only if it isn't adequate for your requirements you need to to go native and develop in say C++ which tends to require more work.
Multitouch in Windows 8 has been redesigned but unless you want to develop for a yet to be release operating system this is not an option.
Use Visual C++ if you like to create a LAN based Application, C++ is known for it's power and you could have many resources that could help you in developing this application. If you're going to create this application for web Use ASP.net(C#) C# is known for its flexibility and class libraries dedicated for web and client appilcation i also advice the use of WPF and Silverlight applications.
I suggest you have a look at Windows 8 and Metro Apps. Here is a link to start with this: The Microsoft BUILD conference, Windows 8, and the new UX Challenge. C# (.NET languages in fact), HTML5 and XAML are clearly the direction. Native C++ is back in town with WinRT. Silverlight is now in the gray area :-)
Even if you don't use Windows 8, it will give you a good overview of multitouch future in the Windows space.

Render environment in DirectX

I want to program for DirectX in C# and i have DirectX SDK,
what kind of project should be choose ? Windows form or ....
You should ask yourself first: What's the purpose of my project?
If you intend to building applications with beautiful 2D-3D visuals, then you just need to learn WPF.
On the other hand, if you wanna build games that require a lot of resources, XNA is the way to go.
Building applications on XNA is a lot of pain, since XNA is built for gaming.
The same can be said about building games with WPF.
In both cases, you don't need to communicate natively with DirectX (Which could be done via C++). Unless you're building a low level rendering engine, or a (very) high budget game.
You should use XNA, that is the replacement for Managed DirectX C#
Microsoft XNA ('XNA's Not Acronymed) is a set of tools with a managed runtime environment provided by Microsoft that facilitates computer game development and management. XNA attempts to free game developers from writing "repetitive boilerplate code" and to bring different aspects of game production into a single system.
From Wikipedia XNA Article.
Unless you want to just render windows but WPF might be the best options. See this blog post.
XNA:
XNA is a game oriented framework that allow you to target multiple hardware easily (Windows, the Xbox 360, Zune and now Windows Phone 7 with version 4) using .NET languages like C#.
Note that there's not a 1-1 relation between XNA and the DirectX SDK, for instance, it doesn't expose D3D10 or D3D11 or some interfaces that you can find in D3DX.
.NET Wrappers:
If your are looking for something similar than the native DirectX API, you have 3 options:
Windows® API Code Pack for Microsoft® .NET Framework:
wraps a bunch of Windows native libraries such as DirectX so they can be used from managed code. Note it doesn't expose API's prior to D3D10 such as D3D9.
SlimDX: Same thing but only for DirectX and exposes Direct3D from version 9 to 11 (SlimDX is an aside project that is not related to Microsoft).
C++/CLI and DIY the wrapper: Unless you have special needs, I wouldn't recommend it.
The final choice depends on your needs. If it's just for learning purpose of the DirectX API but in C#, I would say pick the Windows API Code Pack or SlimDX.

C# GUI programming for beginners: Where to start? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm a C++/Java developer and have no idea about .Net or GUIs. I need to develop a windows app for 2000/XP/Vista/7.
I think I've come to conclusion that C# is the best and the fastest way to go (please correct me if I'm wrong). What do you recommend? Which GUI approach should I learn? (Forms? Any other stuff?)
Is it the best way to compile in .Net 2.0 mode? It's going to be an application for the public to download.
For desktop applications there are basically two options; WinForms and Windows Presentation Foundation (WPF).
WinForms is more traditionally built and hence easier to learn. WinForms might therefore be a simpler start, but if you plan on actually using your gained knowledge in GUI development for .NET I'd say you're better of diving into WPF from the start. It's a much richer framework, and where Microsoft is putting their effort for desktop applications. It is also similar to Silverlight, meaning you can easily get into Silverlight too when you know WPF.
This other question gives some useful resources when getting started with WPF.
Also check out this tutorial at MSDN.
WpfTutorial obviously has a few nice hints for you too!
Good luck!
In my personal development experience Windows Forms is just about as easy as it gets when it comes to rapidly deploying a GUI application on Windows. WPF is of course another option, but using it would likely require you spend some time familiarizing yourself with XAML. Windows Forms look and feel like a lot of the available GUI options for Java, it's just much better than the majority of them, in my opinion.
If you want the fastest possible GUI development time in .NET, Windows Forms is it.
Yes. C# is the language of choice when it comes to .NET development. Since you've programmed in Java, you'll find that the language looks very familiar (it looks a bit cleaner though and has some very nice features like delegates and you can even use pointers if you really want to, although you won't need to in most circumstances).
It's SWF (System Windows Forms) or MWF (Managed Windows Forms - a lightweight version of SWF written in managed Code using System.Drawing - it frees you from the WinAPI that's underlying classical SWF) all the way.
There's also GTK-Sharp, a GTK+ binding for C-Sharp, but since you're developing for Windows, users will find it strange to install a third-party GUI framework for your application.
I wouldn't recommend using WPF though. It makes direct calls to the underlying graphics hardware, which means it's quite fast, but not portable at all. It will only run on x86 systems (not SPARC, etc.) with DirectX compliant hardware rendering units (graphics cards) and it will not run on a system with strong hardware abstraction (like most Unices like BSD or Linux or Solaris).
Novell also stated that they will never implement WPF in the near future due to it's strong hardware dependencies (Novell wants Mono to be portable across many processor platforms). Don't use WPF. Software is no longer just a throw-away-product and when it comes to operating systems we're in the age of spin. The platform you're running today isn't necessarily the platform you're gonna run tomorrow. WPF is a proprietary and patent-encumbered technology developed by Microsoft and Intel. If you use it, you'll find yourself in a very nice Win32-on-x86 vendor lock in. And this means that you'll most definitely find yourself completely re-writing your application sooner or later. Just write portable software from the beginning, even if you don't need that portability today. I'm telling you from experience, you will need portability tomorrow. Definitely!
You could use Windows Forms or Windows Presentation Foundation to develop your GUI; although, Windows Forms might feel more familiar to you. If you search on Google for Windows Forms tutorial, you will get many options for getting started.
If you need to use .NET 2.0, you will be limited to Win Forms. WPF requires .NET 3.5.
I would suggest downloading Microsoft's free Visual Studio Express Edition to use for developemnt. it includes an excellent drag-and-drop GUI design tool.
I would recommend learning Winforms first, then move the WPF. Winforms is easier to learn and get something working quickly. The future however is WPF, so I wouldnt leave that in the dark. I posted some good books and links for GUI development work.
Books
Design of Everyday Things A really good book about design of interfaces. It's not software specific but a must read for GUI designers.
Coding Horror. He recommends a lot of development books on his book list, but these ones are specifically interface-related:
Don't Make Me Think
About Face 3.0
The Inmates Are Running the Asylum
GUI Bloopers
Web Links
Are Confirmation Dialogs Harmful? A blog entry by Guido van Rossum (creator of Python)
GUI Articles A few articles about GUIs by Joel Spolsky (joelonsoftware.com)
Interfaced Systems International Has a lot of resources, especially on their UI References page
User Experience Guidelines for Windows Vista
I disagree with all the WinForms advocates. It's not easier. It may be easier for someone who has traditional experience with GUI programming, but this poster doesn't have that.
WPF has a better design story and the databinding is much, much better than WinForms. You can get up and running on WPF at least as fast as WinForms, and then go much further without running into the limitations that WinForms has. Couple this with the design-time databinding in VS 2010, and I'd say that anyone starting out on GUI development should completely bypass Winforms.
C# WinForms will be the fastest in terms of getting a practical GUI working rapidly. Though if you think on making a complex GUI, with animations, 3D etc, WPF would be better.
You can use CodePlex to find some good working projects to learn from in terms of best practice, both for WinForms and WPF.
You can also look here for some good books on both WPF and WinForms.
C# for sure. Use Winforms for line of business app / classic GUI.
read petzold 'programming windows with c#'
Or just dive in with visual studio. Creating GUI with VS is really easy - you will like it
You will find the langauge transition from java to c# pretty simple (not the gui bit tho)
I think I've come to conclusion that C# is the best and the fastest way to go (please correct me if I'm wrong). What do you recommend?
Personally, I would stick with Java. We (meaning OffByZero, the company I co-founded) have released an encrypted text editor called OBZVault, which is written in Java.
We originally wrote it in Linux, and then ported to Mac OS X and Windows. We found that the Windows port provided a perfectly acceptable look & feel - almost (but not exactly) like a native Windows app.
We used InnoSetup to build a native Windows installer, and found that quite good as well.
Bottom line: unless you want to learn a new language & platform, or you have a specific need for functionality provided by a different platform like .NET, stick with Java for your Windows development too. You'll need to learn a Java GUI framework, but then you'd have to learn WPF or WinForms if you switched to .NET anyway.
It may be faster for an experienced .NET developer to build a Windows app in WinForms or WPF, but if you're already well versed in Java I say stick with the tools (language, libraries, IDE) that you know.

Vector Graphics on Windows Mobile

I have to make an application that runs on both Windows (XP/Vista) and Windows Mobile. The graphics interface must be scalable (for different resolutions) and the controls must be custom (like the ones usually found on music apps).
SVG was my instant choice but the lack of support on Windows Mobile pretty much kill my time budget. I've tried to evaluate WMF and it seems the right answer but i don't really like it.
I was thinking about WPF/XAML but i don't know what are the differences between Windows and Windows Mobile.
The project must be in C# or C++ and it's a commercial project (thus no GPLed libraries).
What would be the best choice? What ma I overlooking?
WinForms has limited support for scaling:
http://sellsbrothers.com/writing/winformsAutoScaling.htm
You may also want to look at "anchor" and "docking":
https://web.archive.org/web/1/http://articles.techrepublic%2ecom%2ecom/5100-10878_11-6165908.html
Combined together you should be able to create a UI that works for both desktop and mobile.
You can do scaling UI in .NET compact framework, like Erwin said with docking and achoring. In the windows mobile applications i have written i do normaly have to write some custom code that deals with things like Font scaling ( Touch founds might need bigger Font then system default if the text should be clickable).
I dont think your going to get it to scale picture correctly without code, i found some question releated that on this site. In my experience i write 99.9% of my code so it runs fine on both windows and windows mobile, but i do make a different UI for windows mobile.
If normaly write code in .NET 2.0 / .NET 2.0 Compact Framework, but if your you dont care about having to install .NET 3 then it should be better ( .NET 2 is wider spread out then .NET 3 )
Another option is the Qt library which is written in C++. It is LGPL which means that it can be used in commercial products without having to release your sources (except for changes to the library itself). If for some reason that isn't good enough they also sell commercial licenses.
It runs on Windows and Windows Mobile. As a bonus if you do a reasonable job of programming (and assuming everything else you're doing coding wise supports it) your application can also be run on Mac OSX, Linux and S60.
It has support for Scalable Vector Graphics, a Canvas with full widget support and a bunch of other nifty features as well! I'd suggest checking out the documentation and seeing if it has everything you need.
Silverlight?

Categories