Click here to Skip to main content
15,890,845 members
Home / Discussions / C#
   

C#

 
Generalhelp me!!!! Pin
SEAGames2222-Apr-05 23:59
SEAGames2222-Apr-05 23:59 
GeneralRe: help me!!!! Pin
Colin Angus Mackay23-Apr-05 0:33
Colin Angus Mackay23-Apr-05 0:33 
Generalmail api Pin
abandito22-Apr-05 23:53
abandito22-Apr-05 23:53 
GeneralSearch Pin
vuthaianh22-Apr-05 23:33
vuthaianh22-Apr-05 23:33 
GeneralRe: Search Pin
Polis Pilavas23-Apr-05 5:32
Polis Pilavas23-Apr-05 5:32 
GeneralRe: Search Pin
Anonymous24-Apr-05 1:44
Anonymous24-Apr-05 1:44 
GeneralRe: Search Pin
vuthaianh24-Apr-05 13:16
vuthaianh24-Apr-05 13:16 
GeneralFile/Folder properties for multiple files Pin
Anonymous22-Apr-05 17:46
Anonymous22-Apr-05 17:46 
Im trying to get the file properties dialog to show for multiple files from within my application. So far ive got something that looks like this:

[StructLayout(LayoutKind.Sequential)]
public class SHELLEXECUTEINFO
{
public int cbSize;
public int fMask;
public IntPtr hwnd;
[MarshalAs(UnmanagedType.LPWStr)]
public string lpVerb;
[MarshalAs(UnmanagedType.LPWStr)]
public string lpFile;
[MarshalAs(UnmanagedType.LPWStr)]
public string lpParameters;
[MarshalAs(UnmanagedType.LPWStr)]
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;
}


public const int SEE_MASK_INVOKEIDLIST = 0xC;
public const int SEE_MASK_NOCLOSEPROCESS = 0x40;
public const int SEE_MASK_FLAG_NO_UI = 0x400;


[DllImport("shell32.dll", CharSet=CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern int ShellExecuteEx(SHELLEXECUTEINFO SEI);




SHELLEXECUTEINFO SEI = new SHELLEXECUTEINFO();
int iReturn;

//set a filename
string strFilename = "c:\\ReadMe.txt";

//set up the structure
SEI.cbSize = Marshal.SizeOf(SEI);
SEI.fMask = SEE_MASK_NOCLOSEPROCESS | SEE_MASK_INVOKEIDLIST | SEE_MASK_FLAG_NO_UI;
SEI.hwnd = this.Handle;
SEI.lpVerb = "properties";
SEI.lpFile = strFilename;
SEI.lpParameters = "\0";
SEI.lpDirectory = "\0";
SEI.nShow = 0;
SEI.hInstApp = 0;
SEI.lpIDList = 0;


iReturn = ShellExecuteEx(SEI);



How can i get it to work for multiple files?
GeneralRe: File/Folder properties for multiple files Pin
leppie22-Apr-05 20:36
leppie22-Apr-05 20:36 
GeneralRe: File/Folder properties for multiple files Pin
Anonymous23-Apr-05 4:22
Anonymous23-Apr-05 4:22 
GeneralThreading Problem Pin
ACorbs22-Apr-05 16:41
ACorbs22-Apr-05 16:41 
GeneralRe: Threading Problem Pin
S. Senthil Kumar22-Apr-05 22:25
S. Senthil Kumar22-Apr-05 22:25 
GeneralRe: Threading Problem Pin
ACorbs23-Apr-05 17:06
ACorbs23-Apr-05 17:06 
Generalcalculate grade point average for 2 students Pin
keithbg22-Apr-05 16:21
keithbg22-Apr-05 16:21 
GeneralRe: calculate grade point average for 2 students Pin
Dave Kreskowiak22-Apr-05 17:23
mveDave Kreskowiak22-Apr-05 17:23 
GeneralRe: calculate grade point average for 2 students Pin
Christian Graus22-Apr-05 17:49
protectorChristian Graus22-Apr-05 17:49 
GeneralRe: calculate grade point average for 2 students Pin
leppie22-Apr-05 20:58
leppie22-Apr-05 20:58 
GeneralRe: calculate grade point average for 2 students Pin
S. Senthil Kumar22-Apr-05 22:31
S. Senthil Kumar22-Apr-05 22:31 
GeneralRe: calculate grade point average for 2 students Pin
Christian in a nice hotel in Singapore24-Apr-05 0:13
sussChristian in a nice hotel in Singapore24-Apr-05 0:13 
Generalbyte[] to string and back again... Pin
Ian Bowler22-Apr-05 10:49
Ian Bowler22-Apr-05 10:49 
GeneralRe: byte[] to string and back again... Pin
CiNN22-Apr-05 20:32
CiNN22-Apr-05 20:32 
GeneralRe: byte[] to string and back again... Pin
leppie22-Apr-05 21:03
leppie22-Apr-05 21:03 
GeneralgetByte Pin
Anonymous22-Apr-05 10:10
Anonymous22-Apr-05 10:10 
GeneralRe: getByte Pin
Le centriste25-Apr-05 4:37
Le centriste25-Apr-05 4:37 
GeneralSaving image Pin
wetdog50022-Apr-05 9:23
wetdog50022-Apr-05 9:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.