Jaa


MSN Deskbar Clip

String appData = System.Environment.GetEnvironmentVariable("APPDATA");

TextReader tr = File.OpenText(appData+@"\MsnDeskbarShortcuts.ini");

while (tr.Peek() != -1)

{

  String shortcutLine = tr.ReadLine();

  if (shortcutLine.ToUpper().StartsWith(shortcut.ToUpper()))

  {

    int eqIndex = shortcutLine.IndexOf("=");

    String shortcutPath = shortcutLine.Substring(eqIndex+1,shortcutLine.Length-(eqIndex+1));

    Clipboard.SetDataObject(shortcutPath,true);

    return;

  }

}

猜猜这几行代码是干什么的?如果你使用MSN Desktop Search,那么可以看看这个叫做MSN Deskbar Clip的创意:

https://weblogs.asp.net/smguest/archive/2004/12/19/327176.aspx