Public Class Form1 Inherits System.Windows.Forms.Form #Region " Vom Windows Form Designer generierter Code " Public Sub New() MyBase.New() ' Dieser Aufruf ist für den Windows Form-Designer erforderlich. InitializeComponent() ' Initialisierungen nach dem Aufruf InitializeComponent() hinzufügen End Sub ' Die Form überschreibt den Löschvorgang der Basisklasse, um Komponenten zu bereinigen. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub ' Für Windows Form-Designer erforderlich Private components As System.ComponentModel.IContainer 'HINWEIS: Die folgende Prozedur ist für den Windows Form-Designer erforderlich 'Sie kann mit dem Windows Form-Designer modifiziert werden. 'Verwenden Sie nicht den Code-Editor zur Bearbeitung. Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents Label5 As System.Windows.Forms.Label Friend WithEvents Label6 As System.Windows.Forms.Label Friend WithEvents Label7 As System.Windows.Forms.Label Friend WithEvents Label8 As System.Windows.Forms.Label Friend WithEvents PictureBox2 As System.Windows.Forms.PictureBox Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents SaveFileDialog1 As System.Windows.Forms.SaveFileDialog Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents TextBox3 As System.Windows.Forms.TextBox Friend WithEvents TextBox4 As System.Windows.Forms.TextBox Friend WithEvents Button4 As System.Windows.Forms.Button Private Sub InitializeComponent() Me.PictureBox1 = New System.Windows.Forms.PictureBox Me.Button1 = New System.Windows.Forms.Button Me.TextBox1 = New System.Windows.Forms.TextBox Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog Me.Button2 = New System.Windows.Forms.Button Me.Label1 = New System.Windows.Forms.Label Me.Label2 = New System.Windows.Forms.Label Me.Label3 = New System.Windows.Forms.Label Me.Label4 = New System.Windows.Forms.Label Me.Label5 = New System.Windows.Forms.Label Me.Label6 = New System.Windows.Forms.Label Me.Label7 = New System.Windows.Forms.Label Me.Label8 = New System.Windows.Forms.Label Me.PictureBox2 = New System.Windows.Forms.PictureBox Me.TextBox2 = New System.Windows.Forms.TextBox Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog Me.Button3 = New System.Windows.Forms.Button Me.TextBox3 = New System.Windows.Forms.TextBox Me.TextBox4 = New System.Windows.Forms.TextBox Me.Button4 = New System.Windows.Forms.Button Me.SuspendLayout() ' 'PictureBox1 ' Me.PictureBox1.Location = New System.Drawing.Point(8, 56) Me.PictureBox1.Name = "PictureBox1" Me.PictureBox1.TabIndex = 0 Me.PictureBox1.TabStop = False ' 'Button1 ' Me.Button1.Location = New System.Drawing.Point(24, 16) Me.Button1.Name = "Button1" Me.Button1.TabIndex = 1 Me.Button1.Text = "Laden" ' 'TextBox1 ' Me.TextBox1.Location = New System.Drawing.Point(8, 120) Me.TextBox1.Name = "TextBox1" Me.TextBox1.TabIndex = 2 Me.TextBox1.Text = "" ' 'Button2 ' Me.Button2.Location = New System.Drawing.Point(168, 16) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(88, 24) Me.Button2.TabIndex = 3 Me.Button2.Text = "Speichern" ' 'Label1 ' Me.Label1.Cursor = System.Windows.Forms.Cursors.Cross Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.Location = New System.Drawing.Point(176, 48) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(8, 8) Me.Label1.TabIndex = 4 Me.Label1.Text = "1" ' 'Label2 ' Me.Label2.Cursor = System.Windows.Forms.Cursors.Cross Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.Location = New System.Drawing.Point(184, 48) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(8, 8) Me.Label2.TabIndex = 4 Me.Label2.Text = "1" ' 'Label3 ' Me.Label3.Cursor = System.Windows.Forms.Cursors.Cross Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.Location = New System.Drawing.Point(200, 48) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(8, 8) Me.Label3.TabIndex = 4 Me.Label3.Text = "1" ' 'Label4 ' Me.Label4.Cursor = System.Windows.Forms.Cursors.Cross Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label4.Location = New System.Drawing.Point(192, 48) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(8, 8) Me.Label4.TabIndex = 4 Me.Label4.Text = "1" ' 'Label5 ' Me.Label5.Cursor = System.Windows.Forms.Cursors.Cross Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label5.Location = New System.Drawing.Point(224, 48) Me.Label5.Name = "Label5" Me.Label5.Size = New System.Drawing.Size(8, 8) Me.Label5.TabIndex = 4 Me.Label5.Text = "1" ' 'Label6 ' Me.Label6.Cursor = System.Windows.Forms.Cursors.Cross Me.Label6.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label6.Location = New System.Drawing.Point(216, 48) Me.Label6.Name = "Label6" Me.Label6.Size = New System.Drawing.Size(8, 8) Me.Label6.TabIndex = 4 Me.Label6.Text = "1" ' 'Label7 ' Me.Label7.Cursor = System.Windows.Forms.Cursors.Cross Me.Label7.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label7.Location = New System.Drawing.Point(208, 48) Me.Label7.Name = "Label7" Me.Label7.Size = New System.Drawing.Size(8, 8) Me.Label7.TabIndex = 4 Me.Label7.Text = "1" ' 'Label8 ' Me.Label8.Cursor = System.Windows.Forms.Cursors.Cross Me.Label8.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label8.Location = New System.Drawing.Point(232, 48) Me.Label8.Name = "Label8" Me.Label8.Size = New System.Drawing.Size(8, 8) Me.Label8.TabIndex = 4 Me.Label8.Text = "1" ' 'PictureBox2 ' Me.PictureBox2.Location = New System.Drawing.Point(176, 56) Me.PictureBox2.Name = "PictureBox2" Me.PictureBox2.Size = New System.Drawing.Size(65, 56) Me.PictureBox2.TabIndex = 5 Me.PictureBox2.TabStop = False ' 'TextBox2 ' Me.TextBox2.Location = New System.Drawing.Point(160, 120) Me.TextBox2.Name = "TextBox2" Me.TextBox2.TabIndex = 2 Me.TextBox2.Text = "" ' 'Button3 ' Me.Button3.Location = New System.Drawing.Point(120, 48) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(32, 24) Me.Button3.TabIndex = 3 Me.Button3.Text = "Z" ' 'TextBox3 ' Me.TextBox3.Location = New System.Drawing.Point(120, 72) Me.TextBox3.Name = "TextBox3" Me.TextBox3.Size = New System.Drawing.Size(32, 20) Me.TextBox3.TabIndex = 6 Me.TextBox3.Text = "" ' 'TextBox4 ' Me.TextBox4.Location = New System.Drawing.Point(120, 120) Me.TextBox4.MaxLength = 8 Me.TextBox4.Name = "TextBox4" Me.TextBox4.Size = New System.Drawing.Size(32, 20) Me.TextBox4.TabIndex = 6 Me.TextBox4.Text = "" ' 'Button4 ' Me.Button4.Location = New System.Drawing.Point(120, 96) Me.Button4.Name = "Button4" Me.Button4.Size = New System.Drawing.Size(32, 24) Me.Button4.TabIndex = 3 Me.Button4.Text = "B" ' 'Form1 ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.ClientSize = New System.Drawing.Size(292, 148) Me.Controls.Add(Me.TextBox3) Me.Controls.Add(Me.PictureBox2) Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.Button2) Me.Controls.Add(Me.TextBox1) Me.Controls.Add(Me.Button1) Me.Controls.Add(Me.PictureBox1) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.Label3) Me.Controls.Add(Me.Label4) Me.Controls.Add(Me.Label5) Me.Controls.Add(Me.Label6) Me.Controls.Add(Me.Label7) Me.Controls.Add(Me.Label8) Me.Controls.Add(Me.TextBox2) Me.Controls.Add(Me.Button3) Me.Controls.Add(Me.TextBox4) Me.Controls.Add(Me.Button4) Me.Name = "Form1" Me.Text = "Form1" Me.ResumeLayout(False) End Sub #End Region Dim gg As Bitmap = New Bitmap(65, 56) Dim xyz As Int16 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click OpenFileDialog1.Filter = "bitmap.bpp | *.bpp" OpenFileDialog1.ShowDialog() Dim G As Bitmap = New Bitmap(OpenFileDialog1.FileName) PictureBox1.Image = G PictureBox1.Width = G.Width PictureBox1.Height = G.Height Übersetzer1(G, TextBox1) erstellerB(TextBox1.Text) TextBox3.Text = TextBox1.Text End Sub Public Sub Übersetzer1(ByVal was As Bitmap, ByVal wohin As Object) Dim x1, x2, x3, x4, x5, x6, x7, x8 As Int16 Dim zahl1, zahl2, zahl3, zahl4, zahl5, zahl6, zahl7, zahl8 As String x1 = 0 : x2 = 0 : x3 = 0 : x4 = 0 : x5 = 0 : x6 = 0 : x7 = 0 : x8 = 0 If was.GetPixel(1, 1).R = 0 Then x1 = 1 If was.GetPixel(2, 1).R = 0 Then x2 = 1 If was.GetPixel(3, 1).R = 0 Then x3 = 1 If was.GetPixel(4, 1).R = 0 Then x4 = 1 If was.GetPixel(5, 1).R = 0 Then x5 = 1 If was.GetPixel(6, 1).R = 0 Then x6 = 1 If was.GetPixel(7, 1).R = 0 Then x7 = 1 If was.GetPixel(8, 1).R = 0 Then x8 = 1 zahl1 = Chr(x1 * 2 ^ 7 + x2 * 2 ^ 6 + x3 * 2 ^ 5 + x4 * 2 ^ 4 + x5 * 2 ^ 3 + x6 * 2 ^ 2 + x7 * 2 ^ 1 + x8 * 2 ^ 0) x1 = 0 : x2 = 0 : x3 = 0 : x4 = 0 : x5 = 0 : x6 = 0 : x7 = 0 : x8 = 0 If was.GetPixel(9, 1).R = 0 Then x1 = 1 If was.GetPixel(10, 1).R = 0 Then x2 = 1 If was.GetPixel(11, 1).R = 0 Then x3 = 1 If was.GetPixel(12, 1).R = 0 Then x4 = 1 If was.GetPixel(13, 1).R = 0 Then x5 = 1 If was.GetPixel(14, 1).R = 0 Then x6 = 1 If was.GetPixel(15, 1).R = 0 Then x7 = 1 If was.GetPixel(16, 1).R = 0 Then x8 = 1 zahl2 = Chr(x1 * 2 ^ 7 + x2 * 2 ^ 6 + x3 * 2 ^ 5 + x4 * 2 ^ 4 + x5 * 2 ^ 3 + x6 * 2 ^ 2 + x7 * 2 ^ 1 + x8 * 2 ^ 0) x1 = 0 : x2 = 0 : x3 = 0 : x4 = 0 : x5 = 0 : x6 = 0 : x7 = 0 : x8 = 0 If was.GetPixel(17, 1).R = 0 Then x1 = 1 If was.GetPixel(18, 1).R = 0 Then x2 = 1 If was.GetPixel(19, 1).R = 0 Then x3 = 1 If was.GetPixel(20, 1).R = 0 Then x4 = 1 If was.GetPixel(21, 1).R = 0 Then x5 = 1 If was.GetPixel(22, 1).R = 0 Then x6 = 1 If was.GetPixel(23, 1).R = 0 Then x7 = 1 If was.GetPixel(24, 1).R = 0 Then x8 = 1 zahl4 = Chr(x1 * 2 ^ 7 + x2 * 2 ^ 6 + x3 * 2 ^ 5 + x4 * 2 ^ 4 + x5 * 2 ^ 3 + x6 * 2 ^ 2 + x7 * 2 ^ 1 + x8 * 2 ^ 0) x1 = 0 : x2 = 0 : x3 = 0 : x4 = 0 : x5 = 0 : x6 = 0 : x7 = 0 : x8 = 0 If was.GetPixel(25, 1).R = 0 Then x1 = 1 If was.GetPixel(26, 1).R = 0 Then x2 = 1 If was.GetPixel(27, 1).R = 0 Then x3 = 1 If was.GetPixel(28, 1).R = 0 Then x4 = 1 If was.GetPixel(29, 1).R = 0 Then x5 = 1 If was.GetPixel(30, 1).R = 0 Then x6 = 1 If was.GetPixel(31, 1).R = 0 Then x7 = 1 If was.GetPixel(32, 1).R = 0 Then x8 = 1 zahl4 = Chr(x1 * 2 ^ 7 + x2 * 2 ^ 6 + x3 * 2 ^ 5 + x4 * 2 ^ 4 + x5 * 2 ^ 3 + x6 * 2 ^ 2 + x7 * 2 ^ 1 + x8 * 2 ^ 0) x1 = 0 : x2 = 0 : x3 = 0 : x4 = 0 : x5 = 0 : x6 = 0 : x7 = 0 : x8 = 0 If was.GetPixel(33, 1).R = 0 Then x1 = 1 If was.GetPixel(34, 1).R = 0 Then x2 = 1 If was.GetPixel(35, 1).R = 0 Then x3 = 1 If was.GetPixel(36, 1).R = 0 Then x4 = 1 If was.GetPixel(37, 1).R = 0 Then x5 = 1 If was.GetPixel(38, 1).R = 0 Then x6 = 1 If was.GetPixel(39, 1).R = 0 Then x7 = 1 If was.GetPixel(40, 1).R = 0 Then x8 = 1 zahl5 = Chr(x1 * 2 ^ 7 + x2 * 2 ^ 6 + x3 * 2 ^ 5 + x4 * 2 ^ 4 + x5 * 2 ^ 3 + x6 * 2 ^ 2 + x7 * 2 ^ 1 + x8 * 2 ^ 0) x1 = 0 : x2 = 0 : x3 = 0 : x4 = 0 : x5 = 0 : x6 = 0 : x7 = 0 : x8 = 0 If was.GetPixel(41, 1).R = 0 Then x1 = 1 If was.GetPixel(42, 1).R = 0 Then x2 = 1 If was.GetPixel(43, 1).R = 0 Then x3 = 1 If was.GetPixel(44, 1).R = 0 Then x4 = 1 If was.GetPixel(45, 1).R = 0 Then x5 = 1 If was.GetPixel(46, 1).R = 0 Then x6 = 1 If was.GetPixel(47, 1).R = 0 Then x7 = 1 If was.GetPixel(48, 1).R = 0 Then x8 = 1 zahl6 = Chr(x1 * 2 ^ 7 + x2 * 2 ^ 6 + x3 * 2 ^ 5 + x4 * 2 ^ 4 + x5 * 2 ^ 3 + x6 * 2 ^ 2 + x7 * 2 ^ 1 + x8 * 2 ^ 0) x1 = 0 : x2 = 0 : x3 = 0 : x4 = 0 : x5 = 0 : x6 = 0 : x7 = 0 : x8 = 0 If was.GetPixel(49, 1).R = 0 Then x1 = 1 If was.GetPixel(50, 1).R = 0 Then x2 = 1 If was.GetPixel(51, 1).R = 0 Then x3 = 1 If was.GetPixel(52, 1).R = 0 Then x4 = 1 If was.GetPixel(53, 1).R = 0 Then x5 = 1 If was.GetPixel(54, 1).R = 0 Then x6 = 1 If was.GetPixel(55, 1).R = 0 Then x7 = 1 If was.GetPixel(56, 1).R = 0 Then x8 = 1 zahl7 = Chr(x1 * 2 ^ 7 + x2 * 2 ^ 6 + x3 * 2 ^ 5 + x4 * 2 ^ 4 + x5 * 2 ^ 3 + x6 * 2 ^ 2 + x7 * 2 ^ 1 + x8 * 2 ^ 0) x1 = 0 : x2 = 0 : x3 = 0 : x4 = 0 : x5 = 0 : x6 = 0 : x7 = 0 : x8 = 0 If was.GetPixel(57, 1).R = 0 Then x1 = 1 If was.GetPixel(58, 1).R = 0 Then x2 = 1 If was.GetPixel(59, 1).R = 0 Then x3 = 1 If was.GetPixel(60, 1).R = 0 Then x4 = 1 If was.GetPixel(61, 1).R = 0 Then x5 = 1 If was.GetPixel(62, 1).R = 0 Then x6 = 1 If was.GetPixel(63, 1).R = 0 Then x7 = 1 If was.GetPixel(64, 1).R = 0 Then x8 = 1 zahl8 = Chr(x1 * 2 ^ 7 + x2 * 2 ^ 6 + x3 * 2 ^ 5 + x4 * 2 ^ 4 + x5 * 2 ^ 3 + x6 * 2 ^ 2 + x7 * 2 ^ 1 + x8 * 2 ^ 0) wohin.text = zahl1 & zahl2 & zahl3 & zahl4 & zahl5 & zahl6 & zahl7 End Sub Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click Schreiber(1, PictureBox2) End Sub Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label2.Click Schreiber(2, PictureBox2) End Sub Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click Schreiber(3, PictureBox2) End Sub Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label3.Click Schreiber(4, PictureBox2) End Sub Private Sub Label7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label7.Click Schreiber(5, PictureBox2) End Sub Private Sub Label6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label6.Click Schreiber(6, PictureBox2) End Sub Private Sub Label5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label5.Click Schreiber(7, PictureBox2) End Sub Private Sub Label8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label8.Click Schreiber(8, PictureBox2) End Sub Public Sub Schreiber(ByVal von As Int16, ByVal wer As Object) Dim y As Int16 If gg.GetPixel(von, 1).R = 255 Then For y = 1 To 55 gg.SetPixel(von, y, Color.Black) Next ElseIf gg.GetPixel(von, 1).R = 0 Then For y = 1 To 55 gg.SetPixel(von, y, Color.White) Next End If wer.Image = gg Übersetzer1(gg, TextBox2) End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim x, y As Int16 For x = 1 To gg.Width - 1 For y = 1 To gg.Height - 1 gg.SetPixel(x, y, Color.White) Next Next End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim dateiname As String Dim dateinummer As Int16 = FreeFile() SaveFileDialog1.Filter = "Bitmap.bpp | *.bpp" SaveFileDialog1.ShowDialog() dateiname = SaveFileDialog1.FileName gg.Save(dateiname) End Sub Public Sub leermacher(ByVal was As Bitmap) Dim x As Int16 Dim y As Int16 For x = 1 To was.Width - 1 For y = 1 To was.Height - 1 was.SetPixel(x, y, Color.White) Next Next End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click If Val(TextBox3.Text) <= 255 Then erstellerB(TextBox3.Text) Else MsgBox("Nur bis 255!") End If End Sub Public Sub erstellerB(ByVal was As String) leermacher(gg) Dim progez As Int16 xyz = 0 Do Until xyz = Len(was) xyz += 1 progez = Asc(Mid(was, xyz, 1)) Dim x1, x2, x3, x4, x5, x6, x7, x8 As Int16 If progez >= (2 ^ 7) Then progez -= (2 ^ 7) x8 = 1 End If If progez >= (2 ^ 6) Then progez -= (2 ^ 6) x7 = 1 End If If progez >= (2 ^ 5) Then progez -= (2 ^ 5) x6 = 1 End If If progez >= (2 ^ 4) Then progez -= (2 ^ 4) x5 = 1 End If If progez >= (2 ^ 3) Then progez -= (2 ^ 3) x4 = 1 End If If progez >= (2 ^ 2) Then progez -= (2 ^ 2) x3 = 1 End If If progez >= 2 Then progez = progez - 2 x2 = 1 End If If progez >= (2 ^ 0) Then progez -= (2 ^ 0) x1 = 1 End If transfer(xyz, x1, x2, x3, x4, x5, x6, x7, x8) Loop End Sub Public Sub transfer(ByVal zahl As Int16, ByVal x1 As Int16, ByVal x2 As Int16, ByVal x3 As Int16, ByVal x4 As Int16, ByVal x5 As Int16, ByVal x6 As Int16, ByVal x7 As Int16, ByVal x8 As Int16) If zahl = 1 Then If x8 = 1 Then Schreiber(1, PictureBox2) If x7 = 1 Then Schreiber(2, PictureBox2) If x6 = 1 Then Schreiber(3, PictureBox2) If x5 = 1 Then Schreiber(4, PictureBox2) If x4 = 1 Then Schreiber(5, PictureBox2) If x3 = 1 Then Schreiber(6, PictureBox2) If x2 = 1 Then Schreiber(7, PictureBox2) If x1 = 1 Then Schreiber(8, PictureBox2) ElseIf zahl = 2 Then If x8 = 1 Then Schreiber(9, PictureBox2) If x7 = 1 Then Schreiber(10, PictureBox2) If x6 = 1 Then Schreiber(11, PictureBox2) If x5 = 1 Then Schreiber(12, PictureBox2) If x4 = 1 Then Schreiber(13, PictureBox2) If x3 = 1 Then Schreiber(14, PictureBox2) If x2 = 1 Then Schreiber(15, PictureBox2) If x1 = 1 Then Schreiber(16, PictureBox2) ElseIf zahl = 3 Then If x8 = 1 Then Schreiber(17, PictureBox2) If x7 = 1 Then Schreiber(18, PictureBox2) If x6 = 1 Then Schreiber(19, PictureBox2) If x5 = 1 Then Schreiber(20, PictureBox2) If x4 = 1 Then Schreiber(21, PictureBox2) If x3 = 1 Then Schreiber(22, PictureBox2) If x2 = 1 Then Schreiber(23, PictureBox2) If x1 = 1 Then Schreiber(24, PictureBox2) ElseIf zahl = 4 Then If x8 = 1 Then Schreiber(25, PictureBox2) If x7 = 1 Then Schreiber(26, PictureBox2) If x6 = 1 Then Schreiber(27, PictureBox2) If x5 = 1 Then Schreiber(28, PictureBox2) If x4 = 1 Then Schreiber(29, PictureBox2) If x3 = 1 Then Schreiber(30, PictureBox2) If x2 = 1 Then Schreiber(31, PictureBox2) If x1 = 1 Then Schreiber(32, PictureBox2) ElseIf zahl = 5 Then If x8 = 1 Then Schreiber(33, PictureBox2) If x7 = 1 Then Schreiber(34, PictureBox2) If x6 = 1 Then Schreiber(35, PictureBox2) If x5 = 1 Then Schreiber(36, PictureBox2) If x4 = 1 Then Schreiber(37, PictureBox2) If x3 = 1 Then Schreiber(38, PictureBox2) If x2 = 1 Then Schreiber(39, PictureBox2) If x1 = 1 Then Schreiber(40, PictureBox2) ElseIf zahl = 6 Then If x8 = 1 Then Schreiber(41, PictureBox2) If x7 = 1 Then Schreiber(42, PictureBox2) If x6 = 1 Then Schreiber(43, PictureBox2) If x5 = 1 Then Schreiber(44, PictureBox2) If x4 = 1 Then Schreiber(45, PictureBox2) If x3 = 1 Then Schreiber(46, PictureBox2) If x2 = 1 Then Schreiber(47, PictureBox2) If x1 = 1 Then Schreiber(48, PictureBox2) ElseIf zahl = 7 Then If x8 = 1 Then Schreiber(49, PictureBox2) If x7 = 1 Then Schreiber(50, PictureBox2) If x6 = 1 Then Schreiber(51, PictureBox2) If x5 = 1 Then Schreiber(52, PictureBox2) If x4 = 1 Then Schreiber(53, PictureBox2) If x3 = 1 Then Schreiber(54, PictureBox2) If x2 = 1 Then Schreiber(55, PictureBox2) If x1 = 1 Then Schreiber(56, PictureBox2) ElseIf zahl = 8 Then If x8 = 1 Then Schreiber(57, PictureBox2) If x7 = 1 Then Schreiber(58, PictureBox2) If x6 = 1 Then Schreiber(59, PictureBox2) If x5 = 1 Then Schreiber(60, PictureBox2) If x4 = 1 Then Schreiber(61, PictureBox2) If x3 = 1 Then Schreiber(62, PictureBox2) If x2 = 1 Then Schreiber(63, PictureBox2) If x1 = 1 Then Schreiber(64, PictureBox2) End If End Sub Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged 'TextBox4.Text = Chr(TextBox2.Text) End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click erstellerB(TextBox4.Text) End Sub End Class