01.
bool
focus_txtbx1, focus_txtbx2;
02.
private
void
button1_Click(
object
sender, EventArgs e)
03.
{
04.
if
(focus_txtbx1 ==
true
)
05.
{
06.
this
.textBox1.Text =
"Focus Textbox1 insert data to textbox 1"
;
07.
focus_txtbx1 =
false
;
08.
}
09.
10.
if
(focus_txtbx2 ==
true
)
11.
{
12.
this
.textBox2.Text =
"Focus Textbox2 insert data to textbox 2"
;
13.
focus_txtbx2 =
false
;
14.
}
15.
}
16.
17.
private
void
textBox2_MouseDown(
object
sender, MouseEventArgs e)
18.
{
19.
focus_txtbx2 =
true
;
20.
}
21.
22.
private
void
textBox1_MouseDown(
object
sender, MouseEventArgs e)
23.
{
24.
focus_txtbx1 =
true
;
25.
}