01.
Imports
System.Collections.Generic
02.
Imports
System.ComponentModel
03.
Imports
System.Data
04.
Imports
System.Drawing
05.
Imports
System.Linq
06.
Imports
System.Text
07.
Imports
System.Windows.Forms
08.
09.
Namespace
TEXTSUB
10.
Public
Partial
Class
Form1
11.
Inherits
Form
12.
Public
Sub
New
()
13.
InitializeComponent()
14.
End
Sub
15.
16.
17.
18.
Private
Sub
textBox1_KeyDown(sender
As
Object
, e
As
KeyEventArgs)
19.
If
e.KeyCode = Keys.Enter
Then
20.
Dim
s = textBox1.TextLength
21.
MessageBox.Show(s.ToString())
22.
textBox3.Text = textBox1.Text
23.
textBox2.Focus()
24.
End
If
25.
26.
End
Sub
27.
Private
Sub
textBox2_KeyDown(sender
As
Object
, e
As
KeyEventArgs)
28.
Dim
s = textBox2.Text
29.
If
e.KeyCode = Keys.Enter
Then
30.
Dim
str
As
String
= textBox1.Text.Substring(0, Convert.ToInt32(s))
31.
Dim
etc
As
String
= textBox1.Text.Substring(Convert.ToInt32(s), textBox1.Text.Length - Convert.ToInt32(s))
32.
Dim
dot
As
String
=
""
33.
For
i
As
Integer
= 0
To
etc.Length - 1
34.
dot += etc.Substring(i, etc.Length - i).Replace(etc.Substring(i, etc.Length - i),
"."
)
35.
Next
36.
textBox3.Clear()
37.
textBox3.Text = str & dot
38.
End
If
39.
End
Sub
40.
41.
42.
End
Class
43.
End
Namespace