static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

#if (!DEBUG)
            frmSplash splash = new frmSplash();

            DialogResult result = splash.ShowDialog();

            if (result != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }
#endif
            Application.Run(new frmMain());
        }
        /**********************************************************/

        public frmMain()
        {
            InitializeComponent();

            frmSplash splash = new frmSplash();

            this.FormClosing += new FormClosingEventHandler(frmMain_FormClosing);

            ucEvents1.setCallbackHandler(this);

            m_clearLog = new ClearLog(this);

            tsVersion.Text = "Version: " + Assembly.GetExecutingAssembly().GetName().Version.ToString();

            ucQueryRegistration1.setCallbackHandler(this);

            ucManageOptSchedulesView1.setCreateOptScheduleCallback(this);
            oadrucManageOptSchedulesView1.setCreateOptScheduleCallback(this);

            ucResources1.setCallback(this);

            ucReportRequests.setCallback(this);

            VEN2b ven = new VEN2b(new HttpWebRequestWrapper(false, System.Net.SecurityProtocolType.Tls12), tbURL.TextBoxText, tbVENName.TextBoxText,
                                  "", tbVENID.TextBoxText, new HttpSecuritySettings());

            m_venWrapper = new VenWrapper(ven, this);
            setVENParameters();

            ucResources1.addResource("resource1", "Load");

            ucMarketContexts.OnAddItem     += new EventHandler(ucMarketContext_addItem);
            ucMarketContexts.OnRemoveItems += new EventHandler(ucMarketContext_removeItems);

            ucCustomSignals.OnAddItem     += new EventHandler(ucCustomSignal_addItem);
            ucCustomSignals.OnRemoveItems += new EventHandler(ucCustomSignal_removeItems);

            ucMarketContexts.addItem("http://MarketContext1");
        }