Exemplo n.º 1
0
        public override void Open()
        {
            if (!Application.MessageLoop)
            {
                //no message loop=> assume we are starting a new application
                //otherwise we assume we are extending another application and do not bother fiddling
                //with the application
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
            }

            //Grab the default guppy icon
            if (DefaultIcon == null)
            {
                var i = ImageToWinFormsImage(Image.FromResource("guppyicon.png"));
                if (i != null)
                {
                    DefaultIcon = WinFormsUtils.MakeIcon(i, 48, true);
                }
            }
        }