Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Mobile
  4. How to wait until all characters are entered?

How to wait until all characters are entered?

Scheduled Pinned Locked Moved Mobile
csharpdatabasecomdesignalgorithms
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    biop codeproject
    wrote on last edited by
    #1

    I am programming for Windows Mobile 6. I am writing an application. Here is the design: 1) A textbox for user to scan a barcode. 2) After scanning, automatically call web service to search the database. 3) If found data, display in a table below. To solve 2, I use text1_TextChanged(). However, as the barcode is long (some 11 characters), the TextChanged() function is called more than 11 times. That means the database is searched for more than 11 times. The performance is too slow. I have searched the web and find out this: .NET — Textbox control - wait till user is done typing[^] I use the timer approach, but find out the tick function is called 11 times. Any help? (Please note that the barcode is scanned in, not typed in.) [Edited at 2012-08-16] The project is a bit complicated now. The textbox could hold any number of characters from 4 to 24. So I cannot just count to the end. If I start querying the database once I have at least 4 characters, I could end up with searching 20 times...

    A 1 Reply Last reply
    0
    • B biop codeproject

      I am programming for Windows Mobile 6. I am writing an application. Here is the design: 1) A textbox for user to scan a barcode. 2) After scanning, automatically call web service to search the database. 3) If found data, display in a table below. To solve 2, I use text1_TextChanged(). However, as the barcode is long (some 11 characters), the TextChanged() function is called more than 11 times. That means the database is searched for more than 11 times. The performance is too slow. I have searched the web and find out this: .NET — Textbox control - wait till user is done typing[^] I use the timer approach, but find out the tick function is called 11 times. Any help? (Please note that the barcode is scanned in, not typed in.) [Edited at 2012-08-16] The project is a bit complicated now. The textbox could hold any number of characters from 4 to 24. So I cannot just count to the end. If I start querying the database once I have at least 4 characters, I could end up with searching 20 times...

      A Offline
      A Offline
      Andrei Straut
      wrote on last edited by
      #2

      I may be wrong about this (I have no experience with Windows Mobile), but isn't there any way to check for how many characters have been entered in the text field? I mean, you said the barcode is some 11 characters, but does it have any lower bound? (for instance, it can't be shorter than 8 characters). Then, when it reaches the lower bound, you can start querying the database from there. Also alternatively, instead of querying the database automatically when the code is scanned, you could add another button for a manual scan - when the user finishes scanning the barcode and the textfield is completed, show him another button to do the search and display the results in the table. In this case, there is another click for the user, but I think the performance benefits far outweigh the usability drawbacks

      Full-fledged Java/.NET lover, full-fledged PHP hater. Full-fledged Google/Microsoft lover, full-fledged Apple hater. Full-fledged Skype lover, full-fledged YM hater.

      B 1 Reply Last reply
      0
      • A Andrei Straut

        I may be wrong about this (I have no experience with Windows Mobile), but isn't there any way to check for how many characters have been entered in the text field? I mean, you said the barcode is some 11 characters, but does it have any lower bound? (for instance, it can't be shorter than 8 characters). Then, when it reaches the lower bound, you can start querying the database from there. Also alternatively, instead of querying the database automatically when the code is scanned, you could add another button for a manual scan - when the user finishes scanning the barcode and the textfield is completed, show him another button to do the search and display the results in the table. In this case, there is another click for the user, but I think the performance benefits far outweigh the usability drawbacks

        Full-fledged Java/.NET lover, full-fledged PHP hater. Full-fledged Google/Microsoft lover, full-fledged Apple hater. Full-fledged Skype lover, full-fledged YM hater.

        B Offline
        B Offline
        biop codeproject
        wrote on last edited by
        #3

        Hi Andrei, I cannot start from the lower end. The number of characters now could range from 4 to 24. So if I start off with lower bound - 4 characters, I could end up checking the database 20 times. Of course, I know the solution to add the button to manually trigger the checking of database, but I still want to have the automatically checking.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups