Thursday, February 5, 2009

HTML Map Tag

Example:An image map, with clickable areas:
<img src ="planets.gif" width="145" height="126" alt="Planets" usemap ="#planetmap" />
<map id ="planetmap" name="planetmap">
<area shape ="rect" coords ="0,0,82,126" href ="sun.htm" alt="Sun">
<area shape ="circle" coords ="90,58,3" href ="mercur.htm" alt="Mercury"> <area shape ="circle" coords ="124,58,8" href ="venus.htm" alt="Venus">
</map>
--------------------------------------------------------------------------------
Definition and Usage
The area tag defines a region in an image map.
The area element is always nested inside a map tag.
--------------------------------------------------------------------------------
Browser Support
The area tag is supported in all major browsers.
--------------------------------------------------------------------------------
Differences Between HTML and XHTMLIn HTML the tag has no end tag.
In XHTML the area tag must be properly closed.
--------------------------------------------------------------------------------
coords

if shape="rect" thencoords="left,top,right,bottom"
if shape="circ" thencoords="centerx,centery,radius"
if shape="poly" thencoords="x1,y1,x2,y2,..,xn,yn"

Sunday, February 1, 2009

Manually export Printer Drivers


Open registry and export the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\

Get the list of files took from HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\\Dependent Files

Copy them from
%systemroot%\system32\spool\drivers\w32x86\3

Go to the destination machine and do the reverse tasks.

Thursday, November 13, 2008

Download and Save Google Static Map Image Programatically

//Download Image
Uri uri = new Uri("http://maps.google.com/staticmap?center=45.728220,4.830321&zoom=8&size=200x200&maptype=roadmap&key=ABQIAAAAaHAby4XeLCIadFkAUW4vmRSkJGe9mG57rOapogjk9M-sm4TzXxR2I7bi2Qkj-opZe16CdmDs7_dNrQ");

HttpWebRequest httpRequest = (HttpWebRequest)HttpWebRequest.Create(uri);

httpRequest.Timeout = 15000;

httpRequest.ReadWriteTimeout = 20000;

HttpWebResponse httpResponse = (HttpWebResponse)httpRequest.GetResponse();

Stream imageStream = httpResponse.GetResponseStream();

//Bitmap MyImage= new Bitmap(imageStream);

System.Drawing.Bitmap MyImage = new System.Drawing.Bitmap(imageStream);

httpResponse.Close();

imageStream.Close();

MyImage.Save(PATH+FileName, System.Drawing.Imaging.ImageFormat.Jpeg);