I am rebuilding a project that I originally coded in SharpDevelop in Visual Studio. The relevant code worked in SharpDevelop.
The following steps should illustrate the problem:
- Create a new project
- Add a reference to System.Data.SQLLite (I am using the DLL for .NET 4.5)
In the main form, add the using statement:
using System.Data.SQLite;
In the form's Load event, attach the event handler
private void PriceType2_Load(object sender, EventArgs e) { MessageBox.Show("Load event hNDLER"); SQLiteConnection con; //con = new SQLiteConnection(); }
That works, but if you uncomment the next line, it doesn't.
private void PriceType2_Load(object sender, EventArgs e)
{
//SetDisableColors();
//ToggleEnableOff();
MessageBox.Show("Load event");
SQLiteConnection con;
con = new SQLiteConnection();
}
The form opens, but the message box is not displayed. As I said, it works fine in SharpDevelop. And in case you're wondering, I am migrating the project because I need a grown up Report Viewer.
Any ideas?