zoukankan      html  css  js  c++  java
  • winform小记

    FormBorderStyle:None让边框消失

    private int time = 5;//停止五秒 //计时器 private void timer1_Tick(object sender, EventArgs e) { if (time!=0) { time; } else { this.timer1.Stop(); UserThisFunction(); } } 让程序停止几秒,我是这样做的。如果用线程的sleep方法的话,UI会不出来

    System.Environment.Exit(0); winform关闭程序

    RegistryKey keyroot = Registry.ClassesRoot;
                string flashkey = @"CLSID\{D27CDB6E-AE6D-11cf-96B8-444553540000}";
                RegistryKey rkFlash = keyroot.OpenSubKey(flashkey);
                if (rkFlash == null)
                {
                    //System.Diagnostics.Process.Start(Application.StartupPath + "\\flash10.exe");
    
                    DialogResult dialog = MessageBox.Show("检测到您的电脑没有安装flash player,现在是否去官方下载所需插件?", "检测提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
                    if (dialog == DialogResult.Yes)
                    {
                        System.Diagnostics.Process.Start("http://get.adobe.com/cn/flashplayer/");
                    }
                    else
                    {
                        Application.Exit();
                    }
                }
                else
                {
                    frmMain f = new frmMain();
                    this.Hide();
                    Application.DoEvents();//中间加这句
                    f.ShowDialog();
                }

    winform检测是否安装了flash

     RegistryKey keyroot = Registry.ClassesRoot;
                string flashkey = @"CLSID\{D27CDB6E-AE6D-11cf-96B8-444553540000}";
                RegistryKey rkFlash = keyroot.OpenSubKey(flashkey);
                if (rkFlash == null)
                {
                    System.Diagnostics.Process.Start(Application.StartupPath + "\\flash10.exe");
                }

    flash player安装文件放在bin目录下

  • 相关阅读:
    hbase shell-namespace(命名空间指令)
    hbase shell-general(常规指令)
    hbase shell概述
    Codeforces Round #412 div2 ABCD
    Educational Codeforces Round 19
    CSU 1786 莫队+KDTree
    cdq分治入门and持续学习orz
    VK Cup 2017
    HRBUST 2072 树上求最大异或路径值
    UvaLive 5811 概率DP
  • 原文地址:https://www.cnblogs.com/hougelou/p/2854471.html
Copyright © 2011-2022 走看看