WinRAR and WinZip don't do that: You highlight the files in Explorer and then tell explorer to open WinZip or WinRAR - Explorer then adds the files to the "command line arguments" part of the application startup, and you can pick them up in your app in one of two ways.
1) If you have a Console app, then they are passed as an array of strings to to the
main
method:
static void Main(string[] args)
{
foreach (string file in args)
{
DoSomethignWithAFile(file);
}
Console.ReadLine();
}
For a windows GUI app, it's different:
private void FrmMain_Load(object sender, EventArgs e)
{
foreach (string file in Environment.GetCommandLineArgs())
{
DoSomethignWithAFile(file);
}
}