PDA

Click to See Complete Forum and Search --> : Question about Mobile Apps???


blakemckenna
Jan 6th, 2010, 10:18 AM
I'm trying my hand at developing a Mobile App using a database. It's a simple application (just getting a feel for things) of data entry and storing it into a SQL Server Express DB. My question is this, what is the common practice for
keying in data in textboxes and then pressing a button to add the data to a DB.

I know in desktop development or even web development, it's common to press a command button to perform some kind of function that adds the record to the database.

I've noticed in the toolbox that a Command Button control doesn't exist. How is this functionality usually handled? How should I execute the function of adding data instead of pressing a "Command Button"?

Thanks,

gep13
Jan 6th, 2010, 10:29 AM
Hey,

You should still find that you have a button control that you can use. This has very similar functionality to the button that you would use in a Windows Form Application on the desktop.

Do you not see this control in your Toolbox?

Gary

blakemckenna
Jan 6th, 2010, 10:40 AM
Gary,

Is it the LinkLabel Control? If not, I think this control would work just as well.

gep13
Jan 6th, 2010, 10:49 AM
Hey Blake,

A LinkLabel will certainly work yes, but I was talking about a plain old button:

75415

Gary

blakemckenna
Jan 6th, 2010, 11:08 AM
Gary,

Here's a screenshot of the "All Device Controls" toolbox. I don't see a "Button" control on this toolbox or any of the other toolboxes.

gep13
Jan 6th, 2010, 11:12 AM
Doh, I see what is going on :)

You are creating a Smart Phone application, where I was creating a Pocket PC application. The main difference is the fact that Pocket PC applications include a touch screen, which gives you the ability to click the button. In your case, you don't have a Touch Screen, you you can't physically click the button.

The LinkLabel is slightly different in the sense that you can browse to it using the direction pad, and then click it with the middle button.

In your case, you either want to use a LinkLabel, or drop a MainMenu on the form, and then create the MenuItem's that control the functionality.

Hope that helps!

Gary

blakemckenna
Jan 6th, 2010, 11:21 AM
Gary,

That helps. One more ? for you while I'm thinking of it. I noticed that, while using the SmartPhone interface, when I try to enter a phone#, I click on the numeric keypad, however, only the letters are entered in the textbox fields. What am I doing wrong here? Is their a "Shift" key or something or do I need to code for it?

Thanks,

gep13
Jan 6th, 2010, 11:26 AM
Hey,

Each phone is different, but normally that is a hot key, bottom left or right key, that switches what you are inputting into the phone. There is normally a visual indication somewhere which says which mode you are currently in.

Gary

gep13
Jan 6th, 2010, 11:27 AM
Or, thinking about it, if you hold down the number key for a couple seconds, it will jump to the number, rather than the first letter of that key.

Gary

petevick
Jan 6th, 2010, 12:30 PM
Hi,
there is some code to set the input mode on smartphone here (http://www.pcreview.co.uk/forums/thread-1300262.php)

I wrote in 2003 so it may not be current :)

Edit:- So it has - SetInputMode (http://msdn.microsoft.com/en-us/library/microsoft.windowsce.forms.inputmodeeditor.setinputmode.aspx)