Language of choice - Windows Mobile Software Development

Just curious..What is everyone's programming language of choice when developing apps for WinMo?
Ive been working (lightly) on a VB program, which is ok, but i feel it isnt as efficient as others might be, and i know efficiency and size is a big issue on mobile devices (obviously)

Depends:
A simple program or one that can be done just using the stuff in the standard system DLLs then I will go for the pain of coding it in WIN32 C++. The resulting application runs like the wind, and can be distributed as a single executable file, no CAB, no installation projects, etc etc.
If I need any web or fancy data functionality, then it is .NET, because it is not worth the hassle of getting all this to work from levels lower down.
Having had lots of previous coding experience in C/C++ then C# is the natural choice, but as far as .NET is concerned, the actual language you code in is irrelevant. It compiles down to IL anyway and the CPU 'JIT' compiles this into its own code before it runs. Hence the performance hit when the program starts and runs.
In .NET, in essence, all you are doing anyway, is creating .NET objects, setting their properties and calling their methods, in order to get them to do what your application requires. A simplistic view, I know, but that's is all there is to it!
The language that you use to do this doesn't really matter, it is just personal preference.

I guess i assumed one language had more efficantcy than another. Like im working with VB atm, and i know it simplifies alot of things to make it easier to use, not sure if it includes all that extra code in the final build or not tho.
I would like to get more pratice with C++ and i have yet to use C# so dono whats different about that.
I would like to eventually start making programs that utilize the .net code and get my programs talking though data on the phone, but im not that advanced yet.
currently im still trying to wrap my head about making a program with a local database. The program im working on currently doesn't store any data, but i would like to to. I would also like (if i get ambitious) to have that program possibly talk to a PC (parent) program and sync with it. But that i think is a ways off.
Also, do the Mobile SDK's look different? The program im working on i started in the 5 SDK, but (obviously) doesnt have Finger friendly IU tools. I haven't looked at the 6/6.5 SDK yet (as id have to start over again i think). Does it have more finger friendly options?

In .NET CF, the finger-friendlinnes and kinetic scrolling and this all isn't available for all controls. Most of them (the classic ones) are, but if you try using scrolling for whole form, it won't work, only scrollbar will. (Probably with some playing with physicsengine and marshalling you might be able to get it working here, too).
In C++, there are numerous examples of this gestures etc directly in SDK, also many other stuff is there.
See, the main difference here is that .NET is fully equipped with stuff to get everything done fast, easy way.
In C++, you must first make this way yourself .

i am using the .net 3.5 framework tho.. Unless you mean C++ vs C#. I thought .net was an expansion on a current language, and not a language on it self (meaning i cant choose to program in .net, its an option to VB, C++ or C#)
I did toy with it, and it appears as tho your right, the forums are the same. IE drop down/combo boxes are not finger friendly. Guess id have to turn it to a button and another form with large radio button options.

C# vs C++ main difference is that C++ is compiled to native code right on first time, which makes it very fast. C# is compiled to MSIL, which is NOT native code yet. When you run c# app, the code is being Just-In-Time (JIT) compiled to native code, which makes it "longer" to load and "slower" to run (usually that makes about 20% of speeddown on classic PCs with very optimalized C++ same code - it probably already is lower, this is a bit older result of testing).
C# has those nice features that it can't get out of its memory etc, the JIT is almost unhackable, so you can't write viruses in it etc.

As far as the SDKs are concerned, there are slight differences from one version to the next but they can be quite difficult to spot.
They can become issues, when code written to run on one platform is run on one several generations away. I have a program that was written in C++ WM2003. Works under all versions of WM until 6.5.3, when the About Dialog box fails to close if the (X) button is pressed. Turns out another value has to be added to the dialogbox flags field to get it to behave properly.
This has been a feature of SDK's from WM 5.0 onwards, but the WM2003 SDK is unaware of it. You have to add it manually to the shell code created by the SDK,
Progress I suppose. The full article is here:
http://forum.xda-developers.com/showthread.php?t=635063

Treo 700xw Verizon Spanish language
Hello fellow .... I'm new to this forum
I have a Treo 700wx and I live in Mexico ...
My Treo is Verizon's company and is currently with the version 1.22 ...
My problem is that it is in English and I need to change the language in Spanish ...
Thank you for your support both the need
Greetings

stephj said:
As far as the SDKs are concerned, there are slight differences from one version to the next but they can be quite difficult to spot.
They can become issues, when code written to run on one platform is run on one several generations away. I have a program that was written in C++ WM2003. Works under all versions of WM until 6.5.3, when the About Dialog box fails to close if the (X) button is pressed. Turns out another value has to be added to the dialogbox flags field to get it to behave properly.
This has been a feature of SDK's from WM 5.0 onwards, but the WM2003 SDK is unaware of it. You have to add it manually to the shell code created by the SDK,
Progress I suppose. The full article is here:
http://forum.xda-developers.com/showthread.php?t=635063
Click to expand...
Click to collapse
I noticed something else odd. When i run the app on my pone, the resolution is off. Now everything looks ok, i just mean that when i run it on my phone, theirs alot of "white dead space" at the bottom. I can only guess this is due to the SDK's catered to phones with smaller screen resolutions (ie Touch Pro) with buttons.. Is their a way for me to switch the resolution to ultilize the full Touch Pro 2 screen size (480x320 i think)?

Funny you should mention that. I replied to a similar post a short while ago. I'm not going to type it all in again, it's here.
http://forum.xda-developers.com/showthread.php?t=637417

Related

I really want to develop software for the XDA but....

I Really Really Really want to develop some stuff for the XDA (I have been doing this sort of stuff for over 25 years!!) but I am not sure if Java would be best or C++ (I am dead good in both)
I know java like the back of my hand
and Borland C++ the same but I do not know Visual C++ at all (I have had a look and don't like what I see)
I am having REAL troubles finding out anything - Can anyone help :?:
A few pointers in the right direction would be great!!
Java has the adavantage of being portable but the packages avaialble are poor (only AWT it seems)
C++ would be great but it seems that you can only use Visual C++ (which is as visual as a blind man on a charging horse)
I need to be able to develop database-type applications with nice pretty controls such as Text Fields List Boxes and the like.
There is a beer in it for anyone who can help
Some options:
Java: no-go - there is no built in JRE on the XDA, so you'd have to count on your users to buy a third party one like Jeode or Creme.
C++: yes Visual C++ doesn't really provide a full visual toolkit, compared to the Borland IDEs, but it's the best performance-wise, and applications will run with minimal install on XDAs
EVB: Have you tried the embedded VB environment - it makes producing programs a doddle with a good screed designer etc, however performance is a dog as it's interpreted. Also access to API functions is difficult, and in a lot of cases (callbacks etc) impossible.
.NET CF: This might be the answer to your problem. You can develop applications using VisualStudio.net for the compact framework (ie the PocketPC) in either VB.Net or C#. The IDE is everything you'd want. The runtime is distributable (although it's 1.5B), but it's currently quite show. Strangely, you can't currently use C++.Net for the CF, but reportedly ths will be rectified soon. It's also quite costly.
So:
- for power, performance and code size, but missing ease of use: eVC
- for ease of use and code size, but limited power and low performance: eVB
- for ease of use and power, but lacking performance, and a 1.5MB CF install: .NET
Judging by your requirements for database style development, and your experience with C++, I'd recommend using C# and the .Net CF
If you don't want to invest in visual studio 2003, then go with eVB, but bear in mind eVB is being phased out and will be unsupported on PPC2003 devices.
hi
Dive into eVC++. Yes it is a pain to get started but you can do anything in it. I do most of my development for desktops in qt so it was a real pain to learn MS weird ways but it is not so bad and it is the only alternative.
Cheers
Ian Bennetts

Today plugins

Recently i was thinking about creating an app which would show me my remaining calltime with one of polish prepaid services. I imagine it would work like that:
1. receiving a specific text message with my account balance from my operator the app would capture it and store the value
2. after each call being made operator sends sms with call cost. this should be deducted from previously stored value. etc etc.
3. value should be displayed somewhere, like on today plugin...
seems simple, but theres a catch;] i can't code for WM5. i just got myself delphi 2006 today and i see it has limited CF support so i can create applicatons... but am i able to create Dlls? also i don't have clue about creating dll's at all, especialy those for WM5. is it even possible with .net? is there any chance for me?
i know, i know, i shoud start to use c++ long time ago, but i'm affraid it' might be a bit to late for me;]
ps. is there anything like WM5 sdk, any guide kit for programmers, specs of any kind? where to look for it? thanks for any help. please note, i'd like to become one of you guys, i could even be of some value;]
heard somewhere that today plugins
cant be written in .net
here is a link to the subject of today plugins
http://forum.xda-developers.com:80/showthread.php?t=234162&highlight=codeguru
thanks, gonna try it in a minute.
(today unbelievable happened - my wizards battery got empty )
interesting. i'll consider switching to c++. as far as i understand it's not normal C, its some kind of mobile oriented c? but no connection with .net? how does it work?
Ok.
C++ is an extension of C to include object oriented programming. The language is not specific for mobile devices, so any book / article on the subject will do for starters.
I taught my self C++ after learning Pascal (Delphi is for Pascal right?) in school and it was quite easy because the languages have similar structure.
Your second stop is to learn WIN32 programming. I don't know how Delphi deals with APIs and function exports (that's what you need for DLLs).
Basically WM programming is very similar to desktop windows programming, except for a few miner difference (like all APIs using only Unicode).
You can download a free development tool called eVC 4 from MS. It looks exactly like Visual Studio 6 if you have any experience with that.
Unfortunately system DLLs like plugins can not be written using .NET but if you search MSDN (I really don't remember the link), there is an article on how to use a basic C++ DLL for the plugin and delegate all the real functionality to a .NET DLL.
Good luck.
yes, delphi is much like pascal
i know it's not that hard if you mean the structure. i just don't know how to start. in fact i got myself evc yesterday, after what you say i'll take good lok at it as soon as i prepare some room on my HD.
Delphi does well with windows api - as far as i can tell, i played with theese a bit so it shouldn't be hard to catch up when starting with c++. other thing is i never did dll, although i know how it works in general, i also used other peoples dll's in my programs. will do i hope. also, Rudegar provided us with good tutorial/example on today dlls, so i hope i'll be able to expand it. the only thing, i'm a bit anxious. you say evc is good for starters? ok, going to give it a try.
what a week, four days, four new RAD environments already
delphi is object pascal which is an extention of pascal like c++ is of c
c programs should compile without any problems in c++
Hi,
I saw a way to develop today plugins in .net : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/TodayScrn.asp?_r=1
I did not try and I guess it will slow down the device as .net is not very fast, but you can try...
Good luck

Extracting Native APIs? Possible...maybe.

Okay, so since the unlocked emulator has a file manager and task manager, does that mean it would be possible to extract them and run them on an actual WP7S device? And if that was possible, would it also be possible to extract the Native APIs from these apps? I'm fairly certain that they use Native APIs because ordinary apps can only access their own directory. I'm not very smart with these things, so sorry if it's obviously impossible or something.
It's wince - the native API is always there, where do you want to extract it from? Also some people figured out most WP7 apps from the emulator ROM are written in native as well. it's always here.
But you can't just put file manager on a WP7 device because there's no access for you to put anything on it, except apps from Marketplace you got the picture? even if we could cook our custom ROMs in the future the only thing we could do is throw in our own DLLs, services or background tools on it and customize it a little. I still doubt you'd be able to develop real WP7 style apps like a file manager or registry editor because the GUI is supposed to be written in Silverlight/XNA. And from those frameworks you can't access the native API unless Microsoft would add support for it.
101% dumb phone. If you think about it then WP7 is even WORSE then iphone.
But what if you could use Visual Studio to load it onto the device? If you look around in it, there is an option for that.
Actual devices will have to be unlocked for developement purposes to allow sideloading through Visual Studio and even then I doubt the system would be able to deploy native code. Developer phone means a yearly fee for membership in the MS developer programm.
I don't think that using native APIs from managed code would be impossible in the SDK - carriers, e.g. will be allowed to use it, but for normal applications the Security Context in .Net would prevent the programm from calling them (Code Security Managers are configurably available in Java and .Net from the beginning, so i believe that would be what MS uses to block access).
And of course programs using those wouldn't get on the marketplace.
Oh, too bad then, but thanks for your response anyway!
Fdo35 said:
Okay, so since the unlocked emulator has a file manager and task manager, does that mean it would be possible to extract them and run them on an actual WP7S device? And if that was possible, would it also be possible to extract the Native APIs from these apps? I'm fairly certain that they use Native APIs because ordinary apps can only access their own directory. I'm not very smart with these things, so sorry if it's obviously impossible or something.
Click to expand...
Click to collapse
Okay, the issue here is the lack of a few key DLLs: Windows 7 Series will not offer GDI most likely (I'm downloading the emulator set now, and will confirm this soon) and will lack comctl32.dll and the like, removing these functions. As it's been stated before, like Windows 7 uses the 6.1 NT Kernel, Windows Phone 7 series uses the 6.5 Windows CE kernel, at least, last that I've heard. It would then be both possible to bring Windows Mobile 6.5 DLLs over, but anything that calls GDI will not work. Solution? Make a mock GDI that uses the new render.
This isn't new either, Windows 7 uses WPF more than ever (Which composes most of the games as well as Windows Media Center), which is a 3D accelerated and fancier way to draw to the screen, and Windows 7's GDI subset has been updated to allow hardware acceleration granted the graphics card allows it (It's actually something the video card driver must tell Windows, as MSDN states)
Deploy native code, no. Run it, of course
I'll be investigating the possibility of native code here shortly. Chances are, you will need to set the target to ARMV6, and set the compile type to Native, not Windows. Most developers, if not all, probably have overlooked this.
I would expect that it'll require privileged access to run native code, so you'll need to solve the code signing problem.
ThymeCypher said:
Okay, the issue here is the lack of a few key DLLs: Windows 7 Series will not offer GDI most likely (I'm downloading the emulator set now, and will confirm this soon) and will lack comctl32.dll and the like, removing these functions. As it's been stated before, like Windows 7 uses the 6.1 NT Kernel, Windows Phone 7 series uses the 6.5 Windows CE kernel, at least, last that I've heard. It would then be both possible to bring Windows Mobile 6.5 DLLs over, but anything that calls GDI will not work. Solution? Make a mock GDI that uses the new render.
Click to expand...
Click to collapse
Well, I doubt things like comctl.dll and some other things like GWES will be that big of an issue once Platform Builder 7 is released and we can just generate these components ourselves. Hell, adding back GDI support (if those rumors aren't just lies) may be as easy as replacing the GWES with a less crippled one generated by Platform Builder. Maybe GDI support is still compiled in but just doesn't output directly to the screen using the default graphics driver implementation. That's how the Dreamcast implementation of Windows CE was. To even see apps like IE on the screen, you need to copy the contents of the standard WinCE GDI output to a DirectDraw surface.
What I'm more worried about is the hackability of the hardware/software. I'm really hoping it's not as insanely locked down to the point to being unhackable like every Zune.
do you think Platform builder is still available for WP7? Since MS won't allow the OEMs to modify the OS I doubt that. Do you have a source? You've seen an announcement from MS or something?
RAMMANN said:
do you think Platform builder is still available for WP7? Since MS won't allow the OEMs to modify the OS I doubt that. Do you have a source? You've seen an announcement from MS or something?
Click to expand...
Click to collapse
Platformbuilder is for the OS, which is Windows CE. There is still some debate as to what version the emulator is running, leaving alone the possibility that the actual version of the OS may be different at release.
If the CE6R3 camp is right, you can get platform builder for that right now, though you wont have telshell.exe (WP7 replacement for explorer.exe), and the WP7 specific apps. It would be an interesting exercise to see if they could be run on CE6R3. If no one beats me to the punch, I plan on trying this for myself when I am less swamped at work.
If the CE7 camp is right, you will have to wait till MS releases that version to the public. And they WILL release it because there are far too many embedded systems outside of phones that run on CE for them to neglect it.
No, I was talking about the generic Windows CE 7.0 Platform Builder and not the OEM specific OAK for WP7S. Unless MS plans to completely drop their generic Embedded Windows CE offerings, I see no reason why PB 7.0 will not be released and help with hacking WP7S (if it is even based on 7.0). You always needed to be a large ODM and sing an NDA to use a Platform Builder addon/OAK for the MS platforms like Pocket PC. Those almost never leak and I can't imagine this would be much different.
RAMMANN said:
do you think Platform builder is still available for WP7? Since MS won't allow the OEMs to modify the OS I doubt that. Do you have a source? You've seen an announcement from MS or something?
Click to expand...
Click to collapse
Yes, platform builder was used to build leaked wp7 arm image.
d:\wm700_6176\platform\common\src
\soc\qcom_v1\oal\power\sleep.c
It is from from nk.exe
use dumpbin.exe to get all methods in dll/exe

[Q] VS2008 beginners problems

Hi,
I have started to learn C++ and have created some programs (MinGW + Code::Blocks) for the command line and I would like to add a GUI and run it on my hopefully soon-to-have WM6.5 phone.
So I installed VS2008, Windows Mobile 6 Professional SDK Refresh and Windows Mobile 6.5.3 Professional DTK.
But when I start a new C++ project for a Mobile Device, I don't get a form where I can add buttons, etc. (sadly I have no idea about GUI programming to do it by hand). Also, the items in the Toolbox are greyed out (which makes sense considering that there is no form to add items to).
The video on MSDN ("Creating your first Windows Mobile 6 Application with Visual Studio 2008") made it look so easy - but that was under C#. I can recreate those steps, so under C# I can add stuff from the Toolbox to the form which looks like a WM device, but not under C++.
Am I missing something?
Thanks in advance!
Yep, that's about right. VB and C#, are both .NET CF languages, and as such are more or less identical. C++ is usually used for MFC, ATL or good old Win32 programming models, where the code creates the windows controls, etc and draws them on the client area.
With a bit of C++ knowledge you should be able to create the same thing in C# without too much trouble, but there are a few pitfalls to fall into along the way. C++ can also be used as a .NET language but the casts required make it hideous to read and understand. Go straight to C#.
The C++ programming models take a bit of mastering, but the code runs like a bat out of hell.
Thank you very much for your reply!
stephj said:
Yep, that's about right. VB and C#, are both .NET CF languages, and as such are more or less identical. C++ is usually used for MFC, ATL or good old Win32 programming models, where the code creates the windows controls, etc and draws them on the client area.
Click to expand...
Click to collapse
So you are saying that in C++, I pretty much HAVE to program everything by hand? (just to make sure I got you right)
With a bit of C++ knowledge you should be able to create the same thing in C# without too much trouble, but there are a few pitfalls to fall into along the way. C++ can also be used as a .NET language but the casts required make it hideous to read and understand. Go straight to C#.
Click to expand...
Click to collapse
K. I do know that C++ and C# should be pretty similar concerning the syntax. But still... any literature recommendations?
The C++ programming models take a bit of mastering, but the code runs like a bat out of hell.
Click to expand...
Click to collapse
That's why I want to stick to C++. My university prefers Java, but don't really like it and find C++ much more "elegant". However, my ideas [dreams?] about programs that I want to write eventually do involve quite some GUI. I had hoped that VS2008 would allow me to quickly get that GUI-stuff out of the way for now, since I thought I use QT for my Windows (and maybe eventually Unix) programs. But as I said, I'm still at the beginning of my learning process, where it is mostly about command line apps to learn the ropes.
Anyways, thanks again!
To be honest I only program WinMo in either Win32 C++ or C#. Although C++ and C# are quite close as far as languages are concerned, the IDE environments are completely different. Under Win32 you respond to the stream of WM_XXXXXX messages fired at your app by the operating system, one for every time something happens. If it is something your app isn't bothered about ignore it. Screen taps get converted to WM_LEFTBUTTONDOWN etc. A button is a child window of the main window, you will have to create it.
In C#, drag an object off the toolbox and drop it on the form, the IDE will maintain any events you wish to trap and use. The machine I have here only has VS 2003 on it, the 2008 machine is at work. I'll have a look at the other C++ models on it next week.
C# and Java are not too far apart, exept that C# uses the .NET framework objects.
As far as books go, I can't really recommend much as I have mastered it from the sharp end as it were, using the online help and examples for day to day, and internet trawls to tackle particular problems. Maybe others can chip in with a few ideas.
I haven't heard of QT running on Windows Mobile, but I could be wrong.
There is also MONO, which is an open source project to run .NET under Linux.
stephj said:
To be honest I only program WinMo in either Win32 C++ or C#. Although C++ and C# are quite close as far as languages are concerned, the IDE environments are completely different. Under Win32 you respond to the stream of WM_XXXXXX messages fired at your app by the operating system, one for every time something happens. If it is something your app isn't bothered about ignore it. Screen taps get converted to WM_LEFTBUTTONDOWN etc. A button is a child window of the main window, you will have to create it.
Click to expand...
Click to collapse
That sounds interesting, but sadly beyond my capabilities at the moment.
In C#, drag an object off the toolbox and drop it on the form, the IDE will maintain any events you wish to trap and use. The machine I have here only has VS 2003 on it, the 2008 machine is at work. I'll have a look at the other C++ models on it next week.
Click to expand...
Click to collapse
Yeah, this sounds much more reasonable for what I'm trying to accomplish, but also means I have to learn 2 languages instead of one (I don't want to give up C++). I guess my Windows Mobile app has to wait for a while.
C# and Java are not too far apart, exept that C# uses the .NET framework objects.
As far as books go, I can't really recommend much as I have mastered it from the sharp end as it were, using the online help and examples for day to day, and internet trawls to tackle particular problems. Maybe others can chip in with a few ideas.
I haven't heard of QT running on Windows Mobile, but I could be wrong.
Click to expand...
Click to collapse
Yeah, QT is more for Symbian. But since I want C++ for both Windows and eventually Unix, I thought QT was a good choice. At that point I did not even consider creating an app for WinMo.
There is also MONO, which is an open source project to run .NET under Linux.
Click to expand...
Click to collapse
Yeah, I've heard of it. Maybe I'll give it a try when I feel comfortable enough with the basics.
Thanks again for your reply, I'll tackle this when I feel more comfortable with C++! Very much appreciated!

[Q] Develop Apps for Windows Mobile

I want to develop simple apps for Windows Mobile. I read that I can use:
---Compact Framemork. (I downloaded Sharp Develop, it is free. It also exist a program from Resco that speedup the development with C.F.)
--- C or C++ or C# (I don't know if WinMo understand these...)
---Visual Basic (is difficult and Visual Studio isn't free, but I found another program that allows to develop more simple)
---Mortscript (I think is the most simple)
---Which is the best and the most simple language?
---Where can I read or download tutorials?
---I can not develop simple apps with images and sounds yet.
Please Help!
I want to develop
-a lock screen
-an app that turn on and turn off the leds of my device
-an app that change registry values (without softreset the device)
-an app that can copy, cut and delete files
-a Soft Imput Panel (a virtual keyboard)
I haven't done windows mobile development in quite some time, so things may have changed a bit. But to help you out better, it would be good to know what version of windows you intend to develop for (I assume Windows Phone 7?) as well as any specific devices you may want to concentrate on, and what experience you already have with coding.
MortScript is probably a good starting point, though if you want to get some real functionality going, you should look at C#.net CF. Take a look at this MSDN resource: LINK. It should be good for getting started.
I think that for modifying the registry, working with LEDs, and for the software keyboard you may need to use C++ ... though I can be mistaken. I'm not sure how Microsoft has worked out libraries and privileges in WP7.
Cyclonezephyrxz7 said:
I haven't done windows mobile development in quite some time, so things may have changed a bit. But to help you out better, it would be good to know what version of windows you intend to develop for (I assume Windows Phone 7?) as well as any specific devices you may want to concentrate on, and what experience you already have with coding.
MortScript is probably a good starting point, though if you want to get some real functionality going, you should look at C#.net CF. Take a look at this MSDN resource: LINK. It should be good for getting started.
I think that for modifying the registry, working with LEDs, and for the software keyboard you may need to use C++ ... though I can be mistaken. I'm not sure how Microsoft has worked out libraries and privileges in WP7.
Click to expand...
Click to collapse
Thanks CycloneZephyrxz7.
I want to develop for Windows Mobile 6.X for devices with WVGA resolution.
But with Mortscript I can do less things? Because I can only write scripts.
Do you know how is written a simple app like "ClearTemp"?
I wait other replies from Devolpers and people that used these languages...

Categories

Resources