Ejemplo n.º 1
0
        /// <summary>
        /// Opens up a folder in File Explorer
        /// </summary>
        /// <param name="foldername"></param>
        /// <returns></returns>
        public static bool ShowFolderExplorer(string foldername)
        {
            SHELLEXECUTEINFO info = new SHELLEXECUTEINFO();

            info.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(info);
            info.lpVerb = "open";
            info.lpFile = foldername;
            info.nShow  = SW_SHOW;
            info.fMask  = SEE_MASK_INVOKEIDLIST;
            return(ShellExecuteEx(ref info));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Shows the property Shell window
        /// </summary>
        /// <param name="filename"></param>
        /// <returns></returns>
        public static bool ShowPropertiesWindow(string filename)
        {
            SHELLEXECUTEINFO info = new SHELLEXECUTEINFO();

            info.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(info);
            info.lpVerb = "properties";
            info.lpFile = filename;
            info.nShow  = SW_SHOW;
            info.fMask  = SEE_MASK_INVOKEIDLIST;
            return(ShellExecuteEx(ref info));
        }
Ejemplo n.º 3
0
 internal static extern bool ShellExecuteEx(ref SHELLEXECUTEINFO lpExecInfo);
Ejemplo n.º 4
0
 /// <summary>
 /// Shows the property Shell window
 /// </summary>
 /// <param name="filename"></param>
 /// <returns></returns>
 public static bool ShowPropertiesWindow(string filename)
 {
     SHELLEXECUTEINFO info = new SHELLEXECUTEINFO();
     info.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(info);
     info.lpVerb = "properties";
     info.lpFile = filename;
     info.nShow = SW_SHOW;
     info.fMask = SEE_MASK_INVOKEIDLIST;
     return ShellExecuteEx(ref info);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Opens up a folder in File Explorer
 /// </summary>
 /// <param name="foldername"></param>
 /// <returns></returns>
 public static bool ShowFolderExplorer(string foldername)
 {
     SHELLEXECUTEINFO info = new SHELLEXECUTEINFO();
     info.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(info);
     info.lpVerb = "open";
     info.lpFile = foldername;
     info.nShow = SW_SHOW;
     info.fMask = SEE_MASK_INVOKEIDLIST;
     return ShellExecuteEx(ref info);
 }
Ejemplo n.º 6
0
 internal static extern bool ShellExecuteEx(ref SHELLEXECUTEINFO lpExecInfo);