使用SHELL调用Windows属性对话框
const int SW_SHOW = 5;
  const int SEE_MASK_INVOKEIDLIST = 0xC;
  [StructLayout(LayoutKind.Sequential)]
   public class SHELLEXECUTEINFO 
  {
   public int cbSize;
   public int fMask;
   public int hwnd;
   public string lpVerb;
   public string lpFile;
   public string lpParameters;
   public string lpDirectory;
   public int nShow;
   public int hInstApp;
   public int lpIDList;
   public string lpClass;
   public int hkeyClass;
   public int dwHotKey;
   public int hIcon;
   public int hProcess;
  }
  [DllImport("shell32")]
  public static extern bool ShellExecuteEx(SHELLEXECUTEINFO sei);
  private void button8_Click(object sender, System.EventArgs e)
  {
   SHELLEXECUTEINFO sei = new SHELLEXECUTEINFO();
   sei.cbSize = Marshal.SizeOf(sei);
   sei.lpFile = "AUTOEXEC.BAT";
   sei.nShow = SW_SHOW;
   sei.fMask = SEE_MASK_INVOKEIDLIST;
   sei.lpVerb = "properties";
   ShellExecuteEx(sei);
  
  }
                    
                
                
            
        
浙公网安备 33010602011771号