切换选项卡与加载动画和网页

时间:2022-06-11 14:44:47

切换选项卡与加载动画和网页

        private void 选项卡_Selected(object sender, TabControlEventArgs e)
        {
            this.BeginInvoke(new Action(() =>
            {
                if (e.TabPage.Text == "农历①") { 动画播放1.Movie = Application.StartupPath + "\\万年历-1.swf"; }
                if (e.TabPage.Text == "农历②") { 动画播放2.Movie = Application.StartupPath + "\\万年历-2.swf"; }
                if (e.TabPage.Text == "农历③") { string 网页 = Application.StartupPath + "\\万年历查询.htm"; 网页浏览.Navigate(网页); }
            }));
        }