So I'm making a random sentence generator that takes subjects, predicates, etc. from user input, stores them, and then randomly chooses one value from each category and prints it in a textbox. Or at least, that's how it's supposed to work. But I just can't seem to get the text to print in the textbox. Everything compiles fine, but when I click generate, Windows gives an error.
Since I have barely any time, for it is a project at an enrichment course that ends in 2 days, I've been trying everything I could without taking too long.
Here's the code:
`Public Class Form1
Dim list1, list2, list3 As String Public Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Dim subjectWords, predicateWords, complementWords As List(Of String) subjectWords.Add(TextBox1.Text) predicateWords.Add(TextBox2.Text) complementWords.Add(TextBox3.Text) list1 = String.Join(",", subjectWords.ToArray) list2 = String.Join(",", predicateWords.ToArray) list3 = String.Join(",", complementWords.ToArray) End Sub Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click TextBox4.Text = list1 & " " & list2 & " " & list3 & "." End Sub End Class`
Since I can't exactly show you guys the GUI (partly because it's in French and partly because it's not my computer), that's all I can give for now.