blob: 731a189a0be04ced7dcbbc99f48b1802783f2a7f [file] [log] [blame] [raw]

using System.Drawing;
using System.IO;
using System.Net;
using System.Windows.Forms;
namespace RemoteView.PageHandlers
{
class IconPageHandler : PageHandler
{
public override byte[] handleRequest(HttpListenerResponse response, string[] uri)
{
using (MemoryStream icon = new MemoryStream())
{
Icon bitmap = Icon.ExtractAssociatedIcon(Application.ExecutablePath);
bitmap.Save(icon);
return icon.GetBuffer();
}
}
}
}