C# help

Discussion in 'Questions (Windows Mobile)' started by Ricky D, Nov 15, 2008.

  1. Ricky D

    Ricky D Well-Known Member Licensed User

    I am trying to re-write my app in C# on my Touch pro because I am having intermittent behaviour problems with the forced QVGA version. The non forced version I run on my QVGA Imate Jasjam doesn't do the behaviour.

    I want to write the app to see if it's either

    a) the Touch pro
    b) or the forced compiled program

    I have managed to incorporate my SIP and Autocomplete classes and they work just fine.

    I'd like to be able to create a single connection to my SQLite database that I can use throughtout the application but I don't see a way to do this in C#.

    so I could do something like

    cmd=new SQLiteCommand(conn); where conn is the global variable that is instantiated and has the database open.

    Currently I have to create a conn for each form that needs to access data and get it to connect to the db and this is a slow process. I'd much rather connect to the db once at the start of the app then allow speedier access on all forms.

    I'm trying to get my head around Static but I haven't seen anything that makes sense.

    //EDIT: I created a public static SQLiteConnection conn; in frmMain.

    In the form load I connect to the db and elsewhere I access it via frmMain.conn like

    cmd=new SQLiteCommand(frmMain.conn);

    and away I go.

    I have found the strongly typed datasets in C# for Compact Framework don't work properly. I couldn't get the data to persist in the database. I did get it working for VB so I don't know what the go is.

    Doing it my way in C# has much less overheads. //EndEDIT

    please help!

    regards, Ricky
    Last edited: Nov 15, 2008
  2. agraham

    agraham Expert Licensed User

    Please can you restate what your outstanding problem(s) is(are) a bit more precisely :confused:
  3. Ricky D

    Ricky D Well-Known Member Licensed User

    it's ok

    all is good.

    The behaviour on the Touch Pro is several of my textboxes are receiving focus when I'm not touching them. This is causing untold problems like the SIP showing even though I hide it at the end of the form load event.

    On each textbox or autocomplete I show the sip in accordance with the type of data - alpha or numeric - in the GotFocus event.

    In the form load various seemingly random controls are receiving the focus. Hence the SIP will be showing even though I explicitly hide it at the end of the load event. I have a .Focus statement near the end of the load event and it doesn't set the focus.

    So I am writing the app in C# to see if it does the same things. So far it's working fine and none of the behaviour that the forced qvga program is happening in the C# version.

    I don't know if you've seen your Diamond Touch do strange things but I have disabled the Touch Flo on my Touch pro because if the phone rings or I receive a text message my app gets killed - I can't see it anywhere and I always have to re-start it.

    regards, Ricky
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice