I currently have a string being sent to a TextBox, although instead is it possible to send it to a listbox?
private void buttonLB_Click(object sender, EventArgs e)
{
string machineName = (@"\\" + System.Environment.MachineName);
ScheduledTasks st = new ScheduledTasks(machineName);
// Get an array of all the task names
string[] taskNames = st.GetTaskNames();
richTextBox6.Text = string.Join(Environment.NewLine, taskNames);
st.Dispose();
}
You can add the joined task names as a single item
Or you can add each of the task names as a separate item