Refreshing the form window
<p>I'm making a small simple windows application. This is my main function:</p>

<pre><code>static void Main()
{

    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);

    // This will be my Form object  
    Form1 robotPath = new Form1();

    Application.Run(robotPath);

    // at this point I'll try to make changes to my object
    // for instance I'll try to change a background image
    robotPath.changeImage();
}
</code></pre>

<p>However after changing my object, the changes are not reflected in the output window (the background is not changed). I've tried robotPath.refresh() and robotPath.invalidate() but still the background is not changing. However, when I call the changeImage function using a button click event it works. But I want it to be changed without using a button/mouse event.(Background changes as the Form1 object is changed)
Any suggestion?</p>
