Exemple #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));
        }
Exemple #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));
        }
Exemple #3
0
 internal static extern bool ShellExecuteEx(ref SHELLEXECUTEINFO lpExecInfo);
Exemple #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);
 }
Exemple #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);
 }
Exemple #6
0
 internal static extern bool ShellExecuteEx(ref SHELLEXECUTEINFO lpExecInfo);