Jump to content

Programming WinMo - which language to begin with?


Guest Cretster

Recommended Posts

Guest Cretster

Hi guys

I'd like to be able to start tinkering with writing small apps for Windows Mobile as I'm enjoying the omnia so much and generally buy winmo phones anyway.

I am already a programmer by trade although currently only have a few years experience in one object orientated language called Graphtalk.

From you folks that are already doing this stuff, I'd be interested to hear what the favoured languages would be for writing winmo apps, and any particularly good resources you've found, in particular if you have only recently started or are self learned etc.

I'm guessing the favoured ones will be Java or C# and I have no experience of these at present but would quite like to start dabbling.

All sensible suggestions gratefully received, cheers :rolleyes:

Jim

Link to comment
Share on other sites

Guest Neobaumuth
Hi guys

I'd like to be able to start tinkering with writing small apps for Windows Mobile as I'm enjoying the omnia so much and generally buy winmo phones anyway.

I am already a programmer by trade although currently only have a few years experience in one object orientated language called Graphtalk.

From you folks that are already doing this stuff, I'd be interested to hear what the favoured languages would be for writing winmo apps, and any particularly good resources you've found, in particular if you have only recently started or are self learned etc.

I'm guessing the favoured ones will be Java or C# and I have no experience of these at present but would quite like to start dabbling.

All sensible suggestions gratefully received, cheers :rolleyes:

Jim

I think the best way is using C++ with Visual C++ from Microsoft. It allows you to save thousand lines of code with MFC programming and the API.

Link to comment
Share on other sites

Guest Cretster

Really? C++ is another one I do not know but I'd read it's not an ideal point for starting off and that it's more complex to learn than others I'd mentioned.

Don't shoot me if that's not true - it's simply what I've read on other sites where I've been looking into this sort of thing.

Link to comment
Share on other sites

Really? C++ is another one I do not know but I'd read it's not an ideal point for starting off and that it's more complex to learn than others I'd mentioned.

Don't shoot me if that's not true - it's simply what I've read on other sites where I've been looking into this sort of thing.

Luckily there's no need to use C++ whatsoever. Simple use the dotnet compact framework (2.0 or 3.5) and there are no hassles with MFC et al.

You can develop in Visual Basic or C# whatever you like. You can use Visual Studio or an open source tool like SharpDevelop. Or you can use a cheap solution like Basic4PPC which is a basic dialect.

Edited by pbrand
Link to comment
Share on other sites

Guest Cretster

Thanks for the suggestions - I'll do some googling later on them.

Are there advantages to using one language over another, or do certain languages lend themselves to certain kinds of apps in any way for instance?

I've read that Python is a very fast one to get stuck into and get results with, and that it's fairly simple to learn.

Link to comment
Share on other sites

Guest X-Ray A4T

Hi,

having been a C# programmer, developing in .net compact framework is really simple. What I did while writing a simple Sudoku for myself as I don't like any of the commercial ones was to build a windows application and once that was working with a form the size of the Omnia screen was to convert it to a compact WM app (mainly copy and paste). I even have simple code to handle the screen rotation. I know there is a free personal edition of Visual Studio you can download but I don't know if it supports compact framework.

Ray

Link to comment
Share on other sites

C# or managed c++ (.net).

Does anybody know which function do i have to use to check the screen orientation (C#)?

I didn't find any funtion to do that or to rotate screen.

I have to make a button (event) to rotate it.

Edited by JeFK
Link to comment
Share on other sites

Guest Cretster

Thanks very much for the replies chaps.

I think I will start looking at C# then (like I have time!). Aside from anything else, it wouldn't hurt to know another language at work, but this is more for fun than anything.

I understand the free (Express) studio does not allow dev for WM, but that a lot of it is similar. I'll have to investigate therefore exactly what I need in terms of software requirements in order to get started.

Link to comment
Share on other sites

Guest Paul (MVP)

JeFK - you can get the screen orientation by reading Microsoft.WindowsCE.SystemSettings.ScreenOrientation, or in more default by getting the bounds of the primaryscreen.

To rotate the screen use Microsoft.WindowsCE.SystemSettings.ScreenOrientation = ScreenOrientation.Angle90 or Microsoft.WindowsCE.SystemSettings.ScreenOrientation = ScreenOrientation.Angle0.

Cretster, sadly the Express editions don't support mobile development (despite me beating on MS and even having an email exchange with Steve Ballmer and then a VS program manager he nominated), but I am hopeful they'll come to their sense in the future.

All you need is VS2005 Standard or VS2008 Pro (not free), the WM SDK (free) and ActiveSync / WMDC (free).

P

Link to comment
Share on other sites

JeFK - you can get the screen orientation by reading Microsoft.WindowsCE.SystemSettings.ScreenOrientation, or in more default by getting the bounds of the primaryscreen.

To rotate the screen use Microsoft.WindowsCE.SystemSettings.ScreenOrientation = ScreenOrientation.Angle90 or Microsoft.WindowsCE.SystemSettings.ScreenOrientation = ScreenOrientation.Angle0.

Cretster, sadly the Express editions don't support mobile development (despite me beating on MS and even having an email exchange with Steve Ballmer and then a VS program manager he nominated), but I am hopeful they'll come to their sense in the future.

All you need is VS2005 Standard or VS2008 Pro (not free), the WM SDK (free) and ActiveSync / WMDC (free).

P

YESS, you are the man. Thanks

Edited by JeFK
Link to comment
Share on other sites

What about full screen? I'd like to have a full screen app. Do you know how can i "read" from g-sensors? Like if i'd like to write a pong game which would be controlled by moving phone.

That would be all.

Manny thanks for your help

Link to comment
Share on other sites

Guest Cretster

Thanks for the info Paul - very useful.

Excuse my ignorance here, but what is the SDK needed for with regards to this? I take it there are elements that are not catered for by say VS2005 alone, but I thought that was a complete development package for a few different languages.

Link to comment
Share on other sites

Guest X-Ray A4T

The SDK lets You build mobile apps in almost the same way as windows apps. By default Visual Studio does not include the things you need to build mobile apps as most people do not need to build mobile apps. The SDK adds this functionality.

Link to comment
Share on other sites

I understand the free (Express) studio does not allow dev for WM, but that a lot of it is similar. I'll have to investigate therefore exactly what I need in terms of software requirements in order to get started.

You could look at SharpDevelop which I mentioned. I don't use it myself but have heard good stories about it. And it does support for WM development.

Link to comment
Share on other sites

I'd like to play a sound when a button is pressed. So i have an event and inialized soundplayer

System.Media.SoundPlayer player = new System.Media.SoundPlayer();

string path="c://a.wav";

player.SoundLocation = path;

player.Load();

player.Play();

I tryed all possibillitys with path but i always get an error when the app came to this part of code.

"

An unhandled exception of type 'System.IO.FileNotFoundException' occurred in System.dll

Additional information: Could not find file '\c:\a.wav'.

"

What's wrong. What path should i write. File is located in c:\, in project dir,...

Edited by JeFK
Link to comment
Share on other sites

string path="c://a.wav";

Although it's windows, sort of, I think WM does not know of a c: drive :rolleyes:

Have you tried

string path=@"\a.wav";

?

Edited by pbrand
Link to comment
Share on other sites

Although it's windows, sort of, I think WM does not know of a c: drive :rolleyes:

Have you tried

string path=@"\a.wav";

?

No, i tryed

player.SoundLocation = @"a.wav";

but i still get an error. App is looking for a file in \a.wav which I think it is a root dir of the device.

I'd like to put some files into dir sounds in the same folder that exe file is.

Although it's windows, sort of, I think WM does not know of a c: drive :)

I have picture for a background and i also added it like d:\pictures\image.jpg..but in this case it works

Edited by JeFK
Link to comment
Share on other sites

Ok! I found out that if i make path "\a.wav", I have to copy this file into the root dir of device. Then it works. But i like to

include those wavs into cab...so the location of wavs depends on path that user specified.

Link to comment
Share on other sites

I have one more question!

I'd like to make an invisible slider which would recognise moving finger from top-bottom or bottom top. I would like to track finger touch like lock/unlock slider on iphone.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.