Exemple #1
0
        public static void Hide(Form owner)
        {
            //owner.ShowInTaskbar = true ;

            //cm.StopT();

            //if (null != cm)
            //    cm.Puase();


            if (_Instance != null)
            {
                _Instance.thdSub.Abort();
                _Instance.thdSub.Join();
                _Instance.myProcessBar.Dispose();
                _Instance.Dispose();



                //_Instance.myProcessBar.Hide();
                //_Instance.myProcessBar.Close();
            }

            _Instance = null;

            owner.UseWaitCursor = false;

            owner.Enabled = true;

            //  Application.DoEvents();
        }
Exemple #2
0
        public static void Show(Form owner)
        {
            //owner.ShowInTaskbar = false;

            //if (null == cm)
            //    cm = new clsMCI();

            //if (File.Exists("国际歌.wma"))
            //{
            //    cm.FileName = "国际歌.wma";
            //    cm.play();
            //}


            owner.UseWaitCursor = true;

            owner.Enabled = false;

            if (_Instance == null)
            {
                _Instance = new NewFrm();
            }

            _Instance.thdSub = new Thread(new ThreadStart(_Instance.ThreadFun));

            //Thread.Sleep(1000);

            // _Instance.myProcessBar.Show(owner);

            //_Instance.thdSub.IsBackground = true;

            _Instance.thdSub.Start();  
        }