Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Focus text in textbox!


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-29-2008, 03:17 PM
Knows the basics
 
Join Date: Mar 2008
Posts: 54
Default Focus text in textbox!

Can anybody tell me how can I select (highlight) text in textbox after 3 seconds..?

I stuck with this:
When I finish with barcode scanning, the number is write in textbox.
When I click again on button for scanning the previous number is not disappear (in the same textbox), so scanner write after previous number like:

5310048000210 - First Scanning
3360372058861 - Second scanning

Result = 53100480002103360372058861

I want after First Scanning to focus textbox with highlight, and then when I push button again the previous text will be disappear in the same textbox and will be come new sanned number.

Any idea, or solution ..?
Reply With Quote
  #2 (permalink)  
Old 03-29-2008, 04:09 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Switzerland
Posts: 707
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

Hi superbabicka,
You can empty the textbox with Textbox1.Text="" before the next scan.
__________________
Klaus
Switzerland
Reply With Quote
  #3 (permalink)  
Old 03-29-2008, 07:35 PM
Knows the basics
 
Join Date: Mar 2008
Posts: 54
Default

I try to use Textbox1.Text="" after 3 seconds, but data in another textboxes automatically disappear when Textbox1.Text="", and I cannot see the customer data after Textbox1.Text=""...

Here (like LOOP) I use Barcode.dll from Erel.

Is there a way (with some command) :
On Next Form Action (Textbox1.Text="") - or something like that...?

Thanks
Reply With Quote
  #4 (permalink)  
Old 03-29-2008, 08:13 PM
Knows the basics
 
Join Date: Mar 2008
Posts: 54
Default OK I fix this !!!



I create new textbox Out of loop and after timer_tick I fill all other textboxes in form

My Code:

Sub Form4_Show
Sbarkod.Text = ""
Sbarcode.New1("Form4","Sbarkod") 'this is Obj. Barcode.dll
TextTrial.Focus 'this is Invisible textbox
Timer3.Enabled=true
Timer3.Interval=200 'less then 1 second (2 millisecond)
End Sub

Sub Sbarcode_TextChanged
SCavt.Text = ""
SNameF.Text = ""
SNameL.Text = ""
SGender.Text = ""
SAddress.Text = ""
SCity.Text = ""
For i = 0 To Table1.RowCount - 1 'Table1 is table where I load CSV database
If Table1.Cell("Barcode",i) = Sbarkod.Text Then
SCavt.Text = Table1.Cell("CAVT Number",i)
SNameF.Text = Table1.Cell("First Name",i)
SNameL.Text = Table1.Cell("Last Name",i)
SGender.Text = Table1.Cell("Gender",i)
SAddress.Text = Table1.Cell("Address",i)
SCity.Text = Table1.Cell("City",i)
End If
Next
End Sub

Sub Timer3_Tick
Sbarkod.Text = TextTrial.Text 'Here I fill data into Sbarkod textbox
TextTrial.Focus
TextTrial.Text = ""
Timer3.Enabled=false
End Sub

Sub TextTrial_KeyPress (key) 'after this click Timer3 is enabled and read data from CSV again
Timer3.Enabled=true
End Sub


Thanks
Reply With Quote
  #5 (permalink)  
Old 03-31-2008, 04:39 PM
Senior Member
 
Join Date: Mar 2008
Posts: 114
Default

Timer Tick rules!

I am using a timer tick to perform a "myTextBox_Click(chr(13))" 100ms after the app receives a navigatingURL from a clicked on hyperlink using agrahams great webbrowser.dll web control.

Something similar to...

Quote:
sub webby_NavigatingURL(url)
' do my other stuff for checking hyperlink
' textbox1.text = URL
timer1.enabled = true
end sub

sub timer1
myTextBox_Click(chr(13))
timer1.enabled = false
end sub
Reply With Quote
  #6 (permalink)  
Old 03-31-2008, 08:04 PM
Knows the basics
 
Join Date: Mar 2008
Posts: 54
Default I cannot use ENTER

I cannot use ENTER because of next scanning...

If I use CHR(13) then will be again same number in the field.
But, your timer tick is helpful for me for another function

Thank you for your post !
Reply With Quote
  #7 (permalink)  
Old 04-01-2008, 12:48 PM
RandomCoder's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: UK
Posts: 486
Awards Showcase
Beta Tester 
Total Awards: 1
Default

You can still use a similar type of idea.
Just check for the text changing and count the number of ticks.
Reset the count everytime the text changes or if still "", when the count reaches 6 (if timer is set to 500ms) then you have your new value.

Regards,
RandomCoder
__________________
Desktop: Pentium D 920 (2.8GHz, 4MB L2 Cache, 800MHz FSB), 1024MB, 256MB Radeon X600, 250GB HD.
Device : Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 1Gb SD.

"Defeat never comes to any man until he admits it."Josephus Daniels
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
TextBox Focus cdeane Questions & Help Needed 6 10-16-2008 04:17 PM
focus on TextBox desired mircome Questions & Help Needed 2 10-01-2008 03:20 PM
Formating text in textbox Dr. Feelgood Questions & Help Needed 1 03-06-2008 06:21 AM
listbox focus select using textbox Dr. Feelgood Questions & Help Needed 2 02-15-2008 01:25 AM
Blank textbox.text value Cableguy Questions & Help Needed 5 06-30-2007 09:58 PM


All times are GMT. The time now is 04:07 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0