Hallo Liebe Gemeinde,
Ich habe eine Programm welches eine Eingabemaske öffnet.
Auf diese Makse wird eine Stückliste erstellt, welche bis zu 30 Positionen haben kann.
Bis zur Position 7 ist alles super (Bis hier wird die komplette Größe der Eingabemaske nciht überschritten).
Aber ab Position 8 wird der Abstand zwischen den Zeilen immer Größer und bleibt nicht wie gewünscht gleich.
(Ab hier wird der Scrollbalken aktiv, da nicht mehr alles auf die Fom passt)
Kenn jemand dieses Problem und weiß wie man sich da helfen kann?
Hier mein Code zum erstellen der Stückliste:
Ich habe eine Programm welches eine Eingabemaske öffnet.
Auf diese Makse wird eine Stückliste erstellt, welche bis zu 30 Positionen haben kann.
Bis zur Position 7 ist alles super (Bis hier wird die komplette Größe der Eingabemaske nciht überschritten).
Aber ab Position 8 wird der Abstand zwischen den Zeilen immer Größer und bleibt nicht wie gewünscht gleich.
(Ab hier wird der Scrollbalken aktiv, da nicht mehr alles auf die Fom passt)
Kenn jemand dieses Problem und weiß wie man sich da helfen kann?
Hier mein Code zum erstellen der Stückliste:
VB.NET-Quellcode
- Sub StücklisteErstellen()
- Zeilenabstand = 60
- For i = 1 To Anzahl
- txtNr(i) = New System.Windows.Forms.TextBox
- Me.Controls.Add(txtNr(i))
- With txtNr(i)
- .Name = "txtNr" & i
- .Size = New System.Drawing.Size(30, 23)
- .Location = New System.Drawing.Point(15, 440 + ((i - 1) * Zeilenabstand))
- .Visible = True
- .Font = New Drawing.Font("ISOCPEUR", 10)
- .Text = i
- .AcceptsReturn = False
- .Multiline = False
- End With
- txtStk(i) = New System.Windows.Forms.TextBox
- Me.Controls.Add(txtStk(i))
- With txtStk(i)
- .Name = "txtStk" & i
- .Size = New System.Drawing.Size(30, 23)
- .Location = New System.Drawing.Point(58, 440 + ((i - 1) * Zeilenabstand))
- .Visible = True
- .Font = New Drawing.Font("ISOCPEUR", 10)
- .Text = Stück(i)
- .AcceptsReturn = False
- .Multiline = False
- End With
- txtBezSt(i) = New System.Windows.Forms.TextBox
- Me.Controls.Add(txtBezSt(i))
- With txtBezSt(i)
- .Name = "txtBezSt" & i
- .Size = New System.Drawing.Size(180, 23)
- .Location = New System.Drawing.Point(101, 440 + ((i - 1) * Zeilenabstand))
- .Visible = True
- .Font = New Drawing.Font("ISOCPEUR", 10)
- .Text = Bezeichnung(i)
- .AcceptsReturn = False
- .Multiline = False
- End With
- txtBezStEngl(i) = New System.Windows.Forms.TextBox
- AddHandler txtBezStEngl(i).GotFocus, AddressOf txtBezStEngl_GotFocus
- Me.Controls.Add(txtBezStEngl(i))
- With txtBezStEngl(i)
- .Name = "txtBezStEngl" & i
- .Size = New System.Drawing.Size(120, 23)
- .Location = New System.Drawing.Point(101, 463 + ((i - 1) * Zeilenabstand))
- .Visible = True
- .Font = New Drawing.Font("ISOCPEUR", 8)
- .Text = BezeichnungEngl(i)
- .AcceptsReturn = False
- .Multiline = False
- End With
- txtBen(i) = New System.Windows.Forms.TextBox
- Me.Controls.Add(txtBen(i))
- With txtBen(i)
- .Name = "txtBen" & i
- .Size = New System.Drawing.Size(180, 23)
- .Location = New System.Drawing.Point(294, 440 + ((i - 1) * Zeilenabstand))
- .Visible = True
- .Font = New Drawing.Font("ISOCPEUR", 10)
- .Text = Benennung(i)
- .AcceptsReturn = False
- .Multiline = False
- End With
- txtMat(i) = New System.Windows.Forms.TextBox
- Me.Controls.Add(txtMat(i))
- With txtMat(i)
- .Name = "txtMat" & i
- .Size = New System.Drawing.Size(65, 23)
- .Location = New System.Drawing.Point(487, 440 + ((i - 1) * Zeilenabstand))
- .Visible = True
- .Font = New Drawing.Font("ISOCPEUR", 10)
- .Text = Material(i)
- .AcceptsReturn = False
- .Multiline = False
- End With
- txtMatDIN(i) = New System.Windows.Forms.TextBox
- Me.Controls.Add(txtMatDIN(i))
- With txtMatDIN(i)
- .Name = "txtMatDIN" & i
- .Size = New System.Drawing.Size(65, 23)
- .Location = New System.Drawing.Point(487, 463 + ((i - 1) * Zeilenabstand))
- .Visible = True
- .Font = New Drawing.Font("ISOCPEUR", 10)
- .Text = MaterialDIN(i)
- .AcceptsReturn = False
- .Multiline = False
- End With
- txtAPZ(i) = New System.Windows.Forms.TextBox
- Me.Controls.Add(txtAPZ(i))
- With txtAPZ(i)
- .Name = "txtAPZ" & i
- .Size = New System.Drawing.Size(120, 23)
- .Location = New System.Drawing.Point(565, 440 + ((i - 1) * Zeilenabstand))
- .Visible = True
- .Font = New Drawing.Font("ISOCPEUR", 10)
- .Text = APZ(i)
- .AcceptsReturn = False
- .Multiline = False
- End With
- txtTNr(i) = New System.Windows.Forms.TextBox
- Me.Controls.Add(txtTNr(i))
- With txtTNr(i)
- .Name = "txtTNr" & i
- .Size = New System.Drawing.Size(65, 23)
- .Location = New System.Drawing.Point(708, 440 + ((i - 1) * Zeilenabstand))
- .Visible = True
- .Font = New Drawing.Font("ISOCPEUR", 10)
- .Text = TeileNr(i)
- .AcceptsReturn = False
- .Multiline = False
- End With
- txtMVN(i) = New System.Windows.Forms.TextBox
- Me.Controls.Add(txtMVN(i))
- With txtMVN(i)
- .Name = "txtMVN" & i
- .Size = New System.Drawing.Size(50, 23)
- .Location = New System.Drawing.Point(786, 440 + ((i - 1) * Zeilenabstand))
- .Visible = True
- .Font = New Drawing.Font("ISOCPEUR", 10)
- .Text = MVN(i)
- .AcceptsReturn = False
- .Multiline = False
- End With
- ComboSuchTNr(i) = New System.Windows.Forms.ComboBox
- AddHandler ComboSuchTNr(i).SelectedIndexChanged, AddressOf ComboBoxes_IndexChanged
- Me.Controls.Add(ComboSuchTNr(i))
- With ComboSuchTNr(i)
- .Name = "ComboSuchTNr" & i
- .Size = New System.Drawing.Size(300, 45)
- .Location = New System.Drawing.Point(870, 440 + ((i - 1) * Zeilenabstand))
- .Visible = True
- .Font = New Drawing.Font("ISOCPEUR", 8)
- .DropDownStyle = Windows.Forms.ComboBoxStyle.DropDownList
- End With
- ComboSuchTNr(i).Items.Add(TNrSuch(i))
- ComboSuchTNr(i).SelectedIndex = 0
- LabVerfügbar(i) = New System.Windows.Forms.Label
- Me.Controls.Add(LabVerfügbar(i))
- With LabVerfügbar(i)
- .Name = "LabVerfügbar" & i
- .Size = New System.Drawing.Size(300, 20)
- .Location = New System.Drawing.Point(870, 470 + ((i - 1) * Zeilenabstand))
- .Visible = True
- .Font = New Drawing.Font("ISOCPEUR", 10)
- .Text = VerfügbarSuch(i)
- End With
- txtBezStEngl(i).Focus()
- Next
- End Sub