I want to hide a button when the DateTime.Now = a input date by user. The textbox100 is in the Form2 and is already public, but I know something else is missing, because I get the error: "The name 'textBox100' does not exist in the current context."
Thank you.
public void Form1_Load(object sender, EventArgs e)
{
var dateTimeStr = textBox100.Text;
var user_time = DateTime.Parse(dateTimeStr);
var time_now = DateTime.Now;
if (time_now >= user_time)
{
button1.Visible = false;
}
}