C# 打开选中文件或文件夹 、窗体居中等

  //用资源管理器打开C:\
  System.Diagnostics.Process.Start( "explorer.exe ",   "C:\ ");
  System.Diagnostics.Process.Start( "C:\ Temp");
 
   ///
        /// 窗体居中
        ///

        ///
        public static void SetMid(Form form)
        {
            form.SetBounds((Screen.GetBounds(form).Width / 2) - (form.Width / 2)
                , (Screen.GetBounds(form).Height / 2) - (form.Height / 2)
                , form.Width, form.Height, BoundsSpecified.Location);
        }

转载于:https://www.cnblogs.com/yonsy/archive/2012/08/27/2657897.html

你可能感兴趣的:(c#)