Jump to content


Photo

Programming WinMo - which language to begin with?

- - - - -

  • Please log in to reply
23 replies to this topic

#1
Cretster

Cretster

    Newbie

  • Members
  • Pip
  • 47 posts
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

  • 0

#2
Neobaumuth

Neobaumuth

    Newbie

  • Members
  • Pip
  • 1 posts
  • Devices:Omia I900

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.

  • 0

#3
Cretster

Cretster

    Newbie

  • Members
  • Pip
  • 47 posts
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.

  • 0

#4
pbrand

pbrand

    Newbie

  • Members
  • Pip
  • 29 posts

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, 16 December 2008 - 02:32 PM.

  • 0

#5
Cretster

Cretster

    Newbie

  • Members
  • Pip
  • 47 posts
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.

  • 0

#6
X-Ray A4T

X-Ray A4T

    Regular

  • Members
  • PipPip
  • 99 posts
  • Location:Johannesburg
  • Devices:Samsung I900 Omnia
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

  • 0
I900 Omnia JCHH1 (African...should I flash to European like I did my I600?)

#7
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 36,366 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:All the Nexus!
  • Twitter:@paulobrien
C# or VB.net on the Compact Framework are your best bet!

P

  • 0

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco

Want to donate? MoDaCo is raising money for the Multiple Sclerosis society.

Posted Image


#8
JeFK

JeFK

    Newbie

  • Members
  • Pip
  • 31 posts
  • Devices:n73
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, 16 December 2008 - 08:27 PM.

  • 0

#9
Cretster

Cretster

    Newbie

  • Members
  • Pip
  • 47 posts
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.

  • 0

#10
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 36,366 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:All the Nexus!
  • Twitter:@paulobrien
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

  • 0

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco

Want to donate? MoDaCo is raising money for the Multiple Sclerosis society.

Posted Image


#11
JeFK

JeFK

    Newbie

  • Members
  • Pip
  • 31 posts
  • Devices:n73

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, 16 December 2008 - 10:06 PM.

  • 0

#12
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 36,366 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:All the Nexus!
  • Twitter:@paulobrien
*bows*

:rolleyes:

P

  • 0

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco

Want to donate? MoDaCo is raising money for the Multiple Sclerosis society.

Posted Image


#13
JeFK

JeFK

    Newbie

  • Members
  • Pip
  • 31 posts
  • Devices:n73
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

  • 0

#14
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 36,366 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:All the Nexus!
  • Twitter:@paulobrien
You can full screen by setting form to maximized IIRC.

re: G-Sensors, check here:

latest version of API for HTC and Omnia: http://www.koushikdu...etergsenso.html

P

  • 0

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco

Want to donate? MoDaCo is raising money for the Multiple Sclerosis society.

Posted Image


#15
Cretster

Cretster

    Newbie

  • Members
  • Pip
  • 47 posts
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.

  • 0

#16
X-Ray A4T

X-Ray A4T

    Regular

  • Members
  • PipPip
  • 99 posts
  • Location:Johannesburg
  • Devices:Samsung I900 Omnia
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.

  • 0
I900 Omnia JCHH1 (African...should I flash to European like I did my I600?)

#17
pbrand

pbrand

    Newbie

  • Members
  • Pip
  • 29 posts

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.

  • 0

#18
JeFK

JeFK

    Newbie

  • Members
  • Pip
  • 31 posts
  • Devices:n73
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, 17 December 2008 - 10:49 AM.

  • 0

#19
pbrand

pbrand

    Newbie

  • Members
  • Pip
  • 29 posts

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, 17 December 2008 - 11:52 AM.

  • 0

#20
JeFK

JeFK

    Newbie

  • Members
  • Pip
  • 31 posts
  • Devices:n73

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, 17 December 2008 - 12:23 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users