Hi,
I have a project that loads a splash screen while initialization takes
place. On the splash form is a label that I want to update with
messages on what is happening with the initialization. Before the main
form is loaded I show the splash screen and then try to update the
splash label to indicate the status. I cannot figure out the correct
syntax.
Here is a code snippet. My last line generates a
"Error 1 'WeatherStation.formSplash.labelStartupStatus' is inaccessible
due to its protection level". How do I fix this?
Thanks
SurfRat.
namespace WeatherStation
{
public partial class formWeatherStation : Form
{
// WeatherStation Constructor
/// <summary>
/// WeatherStation Constructor.
/// </summary>
public formWeatherStation()
{
InitializeComponent();
InitializeWeatherStation();
}
// InitializeWeatherstation
/// <summary>
/// Checks Weatherlink.Dll and com port access.
/// </summary>
public void InitializeWeatherStation()
{
// Instantiate a Splash screen and show it.
formSplash SplashScreen = new formSplash();
SplashScreen.Show();
// Force a refresh so text shows correctly.
SplashScreen.Refresh();
// Try to access Weatherlink.dll and catch any errors.
formSplash.labelStartupStatus.Text = "Hello";