Imports System.IO Public Class Form2 ' Dim wahl As Byte Private Sub Form2_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Location = New Point(800, 500) Text = "Code" RichTextBox2.Text = IO.File.ReadAllText("W:\visual studio 2010\Projects\Dateischreiben\Dateischreiben\Dateischreiben\wahl1.rtf", System.Text.Encoding.UTF8) Select Case wahl 'Case 0 ' RichTextBox1.Text = IO.File.ReadAllText("W:\visual studio 2010\Projects\Form\Form\Form\wahl2.rtf", System.Text.Encoding.UTF8) Case 1 RichTextBox1.Text = Mid(RichTextBox2.Text, 1, 20) + Mid(RichTextBox2.Text, 21, 121) + Mid(RichTextBox2.Text, 975, 12) Case 2 RichTextBox1.Text = Mid(RichTextBox2.Text, 1, 20) + Mid(RichTextBox2.Text, 143, 129) + Mid(RichTextBox2.Text, 975, 12) Case 3 RichTextBox1.Text = Mid(RichTextBox2.Text, 1, 20) + Mid(RichTextBox2.Text, 275, 136) + Mid(RichTextBox2.Text, 975, 12) Case 4 RichTextBox1.Text = Mid(RichTextBox2.Text, 1, 20) + Mid(RichTextBox2.Text, 412, 136) + Mid(RichTextBox2.Text, 975, 12) Case 5 RichTextBox1.Text = Mid(RichTextBox2.Text, 1, 20) + Mid(RichTextBox2.Text, 549, 130) + Mid(RichTextBox2.Text, 975, 12) Case 6 RichTextBox1.Text = Mid(RichTextBox2.Text, 1, 20) + Mid(RichTextBox2.Text, 680, 144) + Mid(RichTextBox2.Text, 975, 12) Case 7 RichTextBox1.Text = Mid(RichTextBox2.Text, 1, 20) + Mid(RichTextBox2.Text, 825, 149) + Mid(RichTextBox2.Text, 975, 12) wahl = 0 End Select Select wahl1 Case 1 RichTextBox1.Text = Mid(RichTextBox2.Text, 987, 19) + Mid(RichTextBox2.Text, 1008, 65) + Mid(RichTextBox2.Text, 1227, 12) Case 2 RichTextBox1.Text = Mid(RichTextBox2.Text, 987, 19) + Mid(RichTextBox2.Text, 1074, 73) + Mid(RichTextBox2.Text, 1227, 12) Case 3 RichTextBox1.Text = Mid(RichTextBox2.Text, 987, 19) + Mid(RichTextBox2.Text, 1148, 78) + Mid(RichTextBox2.Text, 1227, 12) wahl1 = 0 End Select Select Case wahl2 Case 1 RichTextBox1.Text = Mid(RichTextBox2.Text, 1239, 19) + Mid(RichTextBox2.Text, 1259, 103) + Mid(RichTextBox2.Text, 1573, 12) Case 2 RichTextBox1.Text = Mid(RichTextBox2.Text, 1239, 19) + Mid(RichTextBox2.Text, 1363, 104) + Mid(RichTextBox2.Text, 1573, 12) Case 3 RichTextBox1.Text = Mid(RichTextBox2.Text, 1239, 19) + Mid(RichTextBox2.Text, 1468, 104) + Mid(RichTextBox2.Text, 1573, 12) wahl2 = 0 End Select Select Case wahl3 Case 1 RichTextBox1.Text = Mid(RichTextBox2.Text, 1585, 19) + Mid(RichTextBox2.Text, 1607, 219) + Mid(RichTextBox2.Text, 2268, 12) Case 2 RichTextBox1.Text = Mid(RichTextBox2.Text, 1585, 19) + Mid(RichTextBox2.Text, 1829, 215) + Mid(RichTextBox2.Text, 2268, 12) Case 3 RichTextBox1.Text = Mid(RichTextBox2.Text, 1585, 19) + Mid(RichTextBox2.Text, 2047, 220) + Mid(RichTextBox2.Text, 1573, 12) wahl3 = 0 End Select Me.Refresh() End Sub Private Sub richTextBox1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles RichTextBox1.LostFocus Me.Close() End Sub End Class