zoukankan      html  css  js  c++  java
  • 设置winform 自动启动

    private void SetAutoStart()
    {
    try
    {
    string regPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Run";
    string path = Application.ExecutablePath.ToLower();
    string name = System.IO.Path.GetFileName(path);
    var regKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(regPath, true);
    if (regKey == null) regKey = Microsoft.Win32.Registry.LocalMachine.CreateSubKey(regPath);
    regKey.SetValue(name, path);
    }
    catch { }
    }

  • 相关阅读:
    11
    TSP-test
    TSP-SA_TSP
    TSP-PathLength
    TSP-OutputPath
    TSP-NewAnswer
    TSP-
    TSp-dsxy2figxy
    TSP-DrawPath
    TSP-Distanse
  • 原文地址:https://www.cnblogs.com/w519/p/4277396.html
Copyright © 2011-2022 走看看