How come when I put the label text setting here:
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void LoadInfo()
{
label1.Text = DateTime.Now.ToString();
}
The form comes up but no text is displayed?
If I put the label text setting here:
namespace Viewer1
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
label1.Text = DateTime.Now.ToString();
Then it works fine.
What do I need to learn?
Bill