How to create a numeric keypad in VB 2008 -


i developing calculator app windows. want create numeric keypad has numbers , decimal points. how create 1 , pop whenever user selects textbox?

thanks , regards, s sandeep

well, guess got answer myself:

i added 2 boolean variables in form declarations called yesfocusedtxtno1 , yesfocusedtxtno2. used them in gotfocus() method of both textboxes , kept changing variables accordingly. example if txtno1 has focus, yesfocusedtxtno2 = false , yesfocusedtxtno1 = true. added code in onclick method of each button in keypad. (i've given 1 sample.)

dim keynum string = "1"     if yesfocusedtxtno1 = true         txtno1.focus()         txtno1.text = txtno1.text + keynum     else         txtno2.focus()         txtno2.text = txtno2.text + keynum     end if 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -