CosmosScript Problem

  • VB.NET

    CosmosScript Problem

    Hallo Community,

    ich brauche hilfe bei der GUI erstellung für mein aktuelles Projekt.

    Mein Problem ist das ich nur ein Button erstellen kann.

    Hier der Code :

    Variablen :

    VB.NET-Quellcode

    1. Dim Form(50) As System.Windows.Forms.Form
    2. Dim Formi(50) As String
    3. Dim Button(50) As System.Windows.Forms.Button
    4. Dim Buttoni(50) As String


    Funktionen :

    VB.NET-Quellcode

    1. Public Sub NeueForm(ByVal FormName As String, ByVal FormText As String)
    2. For i As Integer = 0 To UBound(Formi)
    3. If Formi(i) = "" Then
    4. Form(i) = New System.Windows.Forms.Form
    5. Form(i).Name = FormName
    6. Form(i).Text = FormText
    7. Formi(i) = FormName
    8. End If
    9. Next
    10. End Sub
    11. Public Sub NeuerButton(ByVal FormName As String, ByVal ButtonName As String, ByVal ButtonText As String, ByVal x As Integer, ByVal y As Integer)
    12. For i As Integer = 0 To UBound(Buttoni)
    13. If Buttoni(i) = "" Then
    14. Button(i) = New System.Windows.Forms.Button
    15. Button(i).Name = ButtonName
    16. Button(i).Text = ButtonText
    17. Button(i).Location = New Point(x, y)
    18. Buttoni(i) = ButtonName
    19. End If
    20. Next
    21. End Sub


    Erstellen :

    VB.NET-Quellcode

    1. Public Function Create(ByVal FormName As String)
    2. Dim Form_ As Integer
    3. For i As Integer = 0 To UBound(Formi)
    4. If Formi(i) = FormName Then
    5. Form_ = i
    6. Else
    7. End If
    8. Next
    9. For i_ As Integer = 0 To UBound(Buttoni)
    10. Form(Form_).Controls.Add(Button(i_))
    11. Next
    12. Application.Run(Form(Form_))
    13. End Function


    Kann mir jemand helfen ?