Sam,
The Sub Main() that Mike mentions in his post is VB-speak. In C#, it would be something like this:
[STAThread]
static void Main()
{
try
{
Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.InvariantCulture;
Application.Run(new Form1());
}
catch (Exception ex)
{
MessageBox.Show(ex.Message + (char)13 + (char)13 + ex.TargetSite +
(char)13 + (char)13 + ex.StackTrace);
}
}
~~Bonnie
>>>Can C# project have a main program that initiates the application and set up all the variables and procedure/functions etc
>>
>>Do you mean something like setting Sub Main in a Module to be the starting point, doing whatcha want to do in the module, and then opening a form after all of that?
>
>Yes.
>
>In VFP it would set up the general environment for the application.
>You might find statements like:
>
>SET EXCLUSIVE OFF
>SET MULTILOCKS ON
>SET DELETE ON
>
>PUBLIC gcVAR1, gcVAR2....
>etc...
>.
>.
>
>
>and it may launch the login screen for the application.....