The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

Writing Mobile 6 Apps?

halkunhalkun Registered User regular
Hey guys.

I just got my new Motorola Q9m phone and was thinking about writing some mobile apps for it. Can someone point me towards some good beginning tutorials to help get my feet wet?

My experience:

I'm mostly a C programmer with an understanding of C++ philosophies. My company just gave me a copy of VS2005 to monkey with and I'm installing it now. I'd like to start out easy with a "hello world" program of some sort. It appears I'm going to be writing in C# for mobile apps, which I've heard about a lot but haven't seen nor coded in it before.

I've also never used VC2005. I'm a linux guy so I'm used to vi/gcc and the like. I've seen the IDE and it looks OK.

halkun on

Posts

  • The DeliveratorThe Deliverator Slingin Pies The California BurbclavesRegistered User regular
    edited July 2008
    I've been looking at this a bit myself. I havent really found much in the way of introductory tutorials geared towards WiMo, though it seems like the programming is pretty straightforward beyond the difference in gui widgets and a few other interface quirks. You'll need the Windows Mobile SDK from Microsoft to actually do anything. It'll provide the templates and debuging tools you'll need.

    The Deliverator on
  • halkunhalkun Registered User regular
    edited July 2008
    No, never mind, it's complete bullshit. The whole Visual Studio interface is retarded.

    All I wanted to do was write something like
    #include <mobile6lib.h> //or whatever the include is for the entry point
    #include <stdio.h>
    
    mobile6_main()   //or whatever the entry point is called
    {
    printf("Hello World\n");
    }
    

    I couldn't even find a place to type any code. It have me a picture of a PDA and a bunch of pregenerated crap I didn't want. I'm going to try this tomorrow after finding some tutorials online.

    halkun on
  • The DeliveratorThe Deliverator Slingin Pies The California BurbclavesRegistered User regular
    edited July 2008
    hahaha. You're not gonna be writing any command line stuff for wimo. Well, you could, but not in C#, and who'd want to type console commands with a stylus anyway?

    You might want to look up some basic C# intro stuff and learn your way around the form designer interface. Learn how the widgets work, what properties they have, etc. It's really easy once you know what's atually going on. Yeah it pre-generates alot of stuff for you, but the vast majority of it is stuff you need done anyway.

    The Deliverator on
  • DeicistDeicist Registered User regular
    edited July 2008
    .Net is event driven, so you need to attach your code to an event. The best one for trying it out is probably the onload event (it's been a while since I did anything in VS so it might not be called that). click the main form for your project (the one that's shown in the main view when you start up) then look at the properties pane for that form (it's down in the bottom right by default I think). One of the tabs is 'Events' click that and look for the load event. Double click in the box and it should create the event for you and take you to a code window.

    Now, from the components window (left hand side) find something like a text box and drag it onto the main form.

    In the code window you want to put something like 'TextBox1.Text = 'Hello World' for the code in the load event. When you run the project the load event fires and puts hello world in the TextBox.

    If you're used to procedural programming, the whole event driven methodology of .Net programming can be a bit disorientating but seriously, Visual Studio is one of the best if not the best IDE I've used.

    edit: Just thought of a better hello world type app:

    Open a new project.

    Drag / Drop a Text box, and a button onto your main form.

    Double click the button, it should take you to a code editor view for 'Button1.Click' (click is the default action for a button).

    Type this:
    Function Button1.Click() {
       TextBox1.Text = "Hello World";
    }
    
    

    Run the project.

    Click the button.

    Deicist on
Sign In or Register to comment.