<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.foxite.com/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>VFP IMAGING</title><link>http://weblogs.foxite.com/vfpimaging/default.aspx</link><description>In this space, I'll try to share some of my favourite tips and techniques manipulating images in Visual FoxPro, specially with Gdi+</description><dc:language>en-US</dc:language><generator>CommunityServer 2.0 (Build: 60217.2664)</generator><item><title>Change the shape of your pictures with GdiPlusX</title><link>http://weblogs.foxite.com/vfpimaging/archive/2009/07/01/8580.aspx</link><pubDate>Wed, 01 Jul 2009 03:46:00 GMT</pubDate><guid isPermaLink="false">8827bd1c-7596-4a8f-b0de-f59ce9ede522:8580</guid><dc:creator>cesarchalom</dc:creator><slash:comments>0</slash:comments><comments>http://weblogs.foxite.com/vfpimaging/comments/8580.aspx</comments><wfw:commentRss>http://weblogs.foxite.com/vfpimaging/commentrss.aspx?PostID=8580</wfw:commentRss><wfw:comment>http://weblogs.foxite.com/rsscomments/8580.aspx</wfw:comment><description>&lt;P&gt;&lt;FONT face=Verdana&gt;The samples below use the &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/k4b8da49.aspx"&gt;&lt;FONT face=Verdana&gt;Graphics.SetClip&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana&gt; function to draw shaped borders in your pictures.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;The trick here is to use the &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/system.drawing.drawing2d.combinemode.aspx"&gt;&lt;FONT face=Verdana&gt;CombineMode.XOR&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana&gt; enumeration, that forces the drawing to the external part of the shape, like in the samples below.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;Playing with the source image below:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="/photos/cesarchalom/images/8576/original.aspx"&gt; &lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;&lt;STRONG&gt;Prerequisites&lt;/STRONG&gt;&lt;BR&gt;Visual FoxPro 9 and the GdiPlusX library from VFPX&amp;nbsp;&lt;IMG src="http://www.codeplex.com/VFPX/Project/FileDownload.aspx?DownloadId=3280"&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;Please make sure that you have the latest version, because this sample may be using&amp;nbsp;some functions that were added or fixed recently. &lt;BR&gt;&lt;/FONT&gt;&lt;A href="http://www.codeplex.com/VFPX/Wiki/View.aspx?title=GDIPlusX&amp;amp;referringTitle=Home"&gt;&lt;FONT face=Verdana color=#02469b&gt;http://www.codeplex.com/VFPX/Wiki/View.aspx?title=GDIPlusX&amp;amp;referringTitle=Home&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face=Verdana&gt;Sample 1: Ellipse shape&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;DO LOCFILE&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;("System.app")&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;WITH _Screen&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;System&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;.Drawing&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Get an image file&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;loBmp &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;as &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;xfcBitmap&lt;BR&gt;loBmp = .&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Bitmap&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;.FromFile(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;GETPICT&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;())&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Create a Gfx object that will allow us to make the transformation&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;loGfx &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;as &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;xfcGraphics&lt;BR&gt;loGfx = .Graphics.FromImage(loBmp)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;lnWidth, lnHeight&lt;BR&gt;lnWidth = loBmp.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Width &lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;lnHeight = loBmp.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Height &lt;BR&gt;&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Create GraphicsPath object.&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;loClipPath &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;as &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;xfcGraphicsPath&lt;BR&gt;loClipPath = .Drawing2D.GraphicsPath.New()&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;* An Ellipse shape&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;loClipPath.AddEllipse(0, 0, lnWidth, lnHeight)&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;* Set clipping region to path.&lt;BR&gt;* CombineMode enumeration&lt;BR&gt;* &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;U&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;http://msdn.microsoft.com/en-us/library/system.drawing.drawing2d.combinemode.aspx&lt;BR&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;* CombineMode.Xor - Two clipping regions are combined by taking only the areas &lt;BR&gt;* enclosed by one or the other region, but not both. &lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;loGfx.SetClip(loClipPath, ;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;_Screen&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;System&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;.Drawing.Drawing2D.CombineMode.Xor)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Fill rectangle to demonstrate clipping region.&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;loGfx.FillRectangle( .Brushes.White, 0, 0, loBmp.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Width&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;, loBmp.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Height&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Save the image to the disk and show&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;loBmp.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Save&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;("Clipped.Jpg", "image/jpeg")&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;RUN &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;/n Explorer.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Exe &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;Clipped.Jpg&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;ENDWITH&lt;BR&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;IMG src="/photos/cesarchalom/images/8577/original.aspx"&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face=Verdana&gt;Sample 2: Doughnut shape&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;DO LOCFILE&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;("System.app")&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;WITH _Screen&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;System&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;.Drawing&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Get an image file&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;loBmp &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;as &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;xfcBitmap&lt;BR&gt;loBmp = .&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Bitmap&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;.FromFile(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;GETPICT&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;())&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Create a Gfx object that will allow us to make the transformation&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;loGfx &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;as &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;xfcGraphics&lt;BR&gt;loGfx = .Graphics.FromImage(loBmp)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;lnWidth, lnHeight&lt;BR&gt;lnWidth = loBmp.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Width &lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;lnHeight = loBmp.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Height &lt;BR&gt;&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Create GraphicsPath object.&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;loClipPath &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;as &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;xfcGraphicsPath&lt;BR&gt;loClipPath = .Drawing2D.GraphicsPath.New()&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;* A Doughnut slice shape&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;loClipPath.AddEllipse(0, 0, lnWidth, lnHeight * 2)&lt;BR&gt;loClipPath.AddEllipse(lnWidth / 4, lnHeight / 2, lnWidth/2, lnHeight * 4)&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;* Set clipping region to path.&lt;BR&gt;* CombineMode enumeration&lt;BR&gt;* &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;U&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;http://msdn.microsoft.com/en-us/library/system.drawing.drawing2d.combinemode.aspx&lt;BR&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;* CombineMode.Xor - Two clipping regions are combined by taking only the areas &lt;BR&gt;* enclosed by one or the other region, but not both. &lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;loGfx.SetClip(loClipPath, ;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;_Screen&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;System&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;.Drawing.Drawing2D.CombineMode.Xor)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Fill rectangle to demonstrate clipping region.&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;loGfx.FillRectangle( .Brushes.White, 0, 0, loBmp.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Width&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;, loBmp.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Height&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Save the image to the disk and show&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;loBmp.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Save&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;("Clipped.Jpg", "image/jpeg")&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;RUN &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;/n Explorer.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Exe &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;Clipped.Jpg&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;ENDWITH&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;IMG src="/photos/cesarchalom/images/8579/original.aspx"&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;STRONG&gt;&lt;FONT face=Verdana color=#000000&gt;Sample 3: Star shape&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;DO LOCFILE&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;("System.app")&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;WITH _Screen&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;System&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;.Drawing&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Get an image file&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;loBmp &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;as &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;xfcBitmap&lt;BR&gt;loBmp = .&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Bitmap&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;.FromFile(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;GETPICT&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;())&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Create a Gfx object that will allow us to make the transformation&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;loGfx &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;as &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;xfcGraphics&lt;BR&gt;loGfx = .Graphics.FromImage(loBmp)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;lnWidth, lnHeight&lt;BR&gt;lnWidth = loBmp.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Width &lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;lnHeight = loBmp.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Height &lt;BR&gt;&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Create GraphicsPath object.&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;loClipPath &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;as &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;xfcGraphicsPath&lt;BR&gt;loClipPath = .Drawing2D.GraphicsPath.New()&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;* Source for the star drawing&lt;BR&gt;* &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;U&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;http://www.java2s.com/Code/VB/2D/GraphicsPathDrawwithFillModeWinding.htm&lt;BR&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;lnRadius, lnPi, lnRadian72, n, lnEdges&lt;BR&gt;lnRadius = lnHeight / 2&lt;BR&gt;lnPi = 3.141592&lt;BR&gt;lnEdges = 5&lt;BR&gt;lnRadian72 = (lnPi * 4.0 ) / lnEdges&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;laPoints(lnEdges)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;FOR &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;n = 1 &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;TO &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;lnEdges&lt;BR&gt;laPoints(n) = .&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Point&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;.New(;&lt;BR&gt;+ lnRadius * &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;SIN&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;( n * lnRadian72 ) + lnRadius , ;&lt;BR&gt;- lnRadius * &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;COS&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;( n * lnRadian72 ) + lnRadius )&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;ENDFOR&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;loClipPath.AddPolygon(@laPoints)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;* Set the Clip Mode to Winding&lt;BR&gt;* ClipMode enumeration&lt;BR&gt;*&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;U&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;http://msdn.microsoft.com/en-us/library/system.drawing.drawing2d.fillmode.aspx&lt;BR&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;FONT size=2&gt;loClipPath.FillMode = &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;_Screen&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;System&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;.Drawing.Drawing2D.FillMode.Winding &lt;BR&gt;&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;* Set clipping region to path.&lt;BR&gt;* CombineMode enumeration&lt;BR&gt;* &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;U&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;http://msdn.microsoft.com/en-us/library/system.drawing.drawing2d.combinemode.aspx&lt;BR&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;* CombineMode.Xor - Two clipping regions are combined by taking only the areas &lt;BR&gt;* enclosed by one or the other region, but not both. &lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;loGfx.SetClip(loClipPath, ;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;_Screen&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;System&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;.Drawing.Drawing2D.CombineMode.Xor)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Fill rectangle to demonstrate clipping region.&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;loGfx.FillRectangle( .Brushes.White, 0, 0, loBmp.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Width&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;, loBmp.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Height&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Save the image to the disk and show&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;loBmp.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Save&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;("Clipped.Jpg", "image/jpeg")&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;RUN &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;/n Explorer.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Exe &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size=2&gt;Clipped.Jpg&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT size=2&gt;ENDWITH&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;IMG src="/photos/cesarchalom/images/8578/original.aspx"&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;Notice that the only difference between the code samples is the shape definition !&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://weblogs.foxite.com/aggbug.aspx?PostID=8580" width="1" height="1"&gt;</description><category domain="http://weblogs.foxite.com/vfpimaging/archive/category/187.aspx">GDI+ AND IMAGES</category></item><item><title>Circular Gauge chart with GdiPlusX</title><link>http://weblogs.foxite.com/vfpimaging/archive/2009/04/24/8242.aspx</link><pubDate>Fri, 24 Apr 2009 02:28:00 GMT</pubDate><guid isPermaLink="false">8827bd1c-7596-4a8f-b0de-f59ce9ede522:8242</guid><dc:creator>cesarchalom</dc:creator><slash:comments>1</slash:comments><comments>http://weblogs.foxite.com/vfpimaging/comments/8242.aspx</comments><wfw:commentRss>http://weblogs.foxite.com/vfpimaging/commentrss.aspx?PostID=8242</wfw:commentRss><wfw:comment>http://weblogs.foxite.com/rsscomments/8242.aspx</wfw:comment><description>&lt;P&gt;Drawing shapes with GdiPlusX is super easy, and we can very easilly transport this to solve some of our chart needs.&lt;/P&gt;
&lt;P&gt;In this post I'm sending you a very primitive sample for creating Circular Gauge charts. Obviously I hope to apply the techniques shown here in FoxCharts. But FoxCharts is getting big, and I confess that learning from the methods in FoxCharts may not be easy for people that are not that familiar with GdiPlusX.&lt;/P&gt;
&lt;P&gt;Please note that this is an unfinished sample. I'm posting it here to let people see that drawing is not that complicated. Just using some imagination, merging it with some geometrical thoughts, and voilá !&lt;/P&gt;
&lt;P&gt;&lt;IMG src="/files/vfpimaging/foxcharts/gauge/gauge.png"&gt;&lt;/P&gt;
&lt;P&gt;Download the &lt;A href="/files/vfpimaging/foxcharts/gauge/gauge.zip"&gt;Gauge sample&lt;/A&gt;, unzip and run TESTGAUGE.SCX ! I'm including the GdiPlusX sources to let everybody immediately run the samples.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Notice that you can control the colors of the background and pointer.&lt;/P&gt;
&lt;P&gt;The pointer shape can be modified too. Play with all the spinners to modify the shape and size! And please tell me which you like most. I'll apreciate&amp;nbsp;receiving some image samples with some desired gauge charts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is the relevant code for the circular gauge drawing. You'll find it in the "&lt;STRONG&gt;BeforeDraw()&lt;/STRONG&gt;" event of the ImageCanvas class. It extracts the information from the form controls, and it's very easy to adapt it to your needs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;lnAngle, lnBaseW, lnBaseX, lnBaseY, lnTopW, lnHeightPercent, lnTopY&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;lnType, lnPointClr, lnBackClr, lnTicks&lt;BR&gt;lnTicks = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Thisform&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.SpnTicks.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Value&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;lnType = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Thisform&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.OptShape.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Value&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;lnAngle = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Thisform&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.SpnAngle.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Value&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;lnBaseW = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Thisform&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.SpnBottomW.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Value&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;lnTopW = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Thisform&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.SpnTopW.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Value&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;lnBaseX = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;This&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Width&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;/2 -lnBaseW/2&lt;BR&gt;lnBaseY = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;This&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Height&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;/2&lt;BR&gt;lnHeightPercent = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Thisform&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.SpnHeight.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Value &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;/ 100&lt;BR&gt;lnTopY = lnBaseY - (lnBaseY * lnHeightPercent) + lnTopW / 2&lt;BR&gt;lnPointClr = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Thisform&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.ShpPointerColor.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;BackColor&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;lnBackClr = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Thisform&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.ShpBackColor.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;BackColor&lt;BR&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;loGfx &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;as &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;xfcGraphics&lt;BR&gt;loGfx = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;This&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.oGfx&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;WITH _Screen&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;System&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.Drawing&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp; LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;loBrush &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;as &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;xfcSolidBrush&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;loBrush = .SolidBrush.New(.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Color&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.FromRGB(lnPointClr))&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp; &lt;FONT color=#000000&gt;loGfx.&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Clear&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" color=#000000 size=2&gt;(.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Color&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" color=#000000 size=2&gt;.FromRGB(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Thisform&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" color=#000000 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;BackColor&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#000000&gt;))&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;* Create a Shape for the pointer&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp; LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;loPath &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;as &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;xfcGraphicsPath&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;loPath = .Drawing2D.GraphicsPath.New()&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;loPath.StartFigure()&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;loGfx.FillEllipse(.SolidBrush.New(.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Color&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.FromRGB(lnBackClr)), ;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.Rectangle)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp; IF &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;lnType = 1&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;loPath.AddArc(lnBaseX, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;This&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Height&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;/2 -lnBaseW/2, lnBaseW, lnBaseW, 0, 180)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp; ENDIF&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;loPath.AddLine(lnBaseX, lnBaseY, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;This&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Width&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;/2 - lnTopW/2, lnTopY)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp; IF &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;lnType = 1&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;laPoints(3)&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;laPoints(1) = .&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Point&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.New(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;This&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Width&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;/2 - lnTopW/2, lnTopY)&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;laPoints(2) = .&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Point&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.New(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;This&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Width&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;/2 , lnTopY - lnTopW / 2)&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;laPoints(3) = .&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Point&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.New(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;This&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Width&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;/2 + lnTopW/2, lnTopY)&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;loPath.AddCurve(@laPoints)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp; ENDIF&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;loPath.AddLine( &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;This&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Width&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;/2 + lnTopW/2, lnTopY, lnBaseX + lnBaseW, lnBaseY)&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;loPath.CloseFigure()&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;* Rotate the shape pointer&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;loGfx.TranslateTransform(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;This&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Width&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;/2, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;This&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Height&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;/2)&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;loGfx.RotateTransform(lnAngle)&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;loGfx.TranslateTransform(- &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;This&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Width&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;/2, - &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;This&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Height&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;/2)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;* Draw the pointer&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;loGfx.FillPath(loBrush, loPath)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;* Restore the original Gfx rotation state&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;loGfx.ResetTransform()&lt;BR&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp; IF &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;lnTicks &amp;gt; 0&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FOR &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;lnAngle = 0 &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;TO &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;360 &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;STEP &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;360 / lnTicks&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;* Rotate the Gfx&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;loGfx.TranslateTransform(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;This&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Width&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;/2, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;This&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Height&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;/2)&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;loGfx.RotateTransform(lnAngle)&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;loGfx.TranslateTransform(- &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;This&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Width&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;/2, - &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;This&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Height&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;/2)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;* Draw the ticks&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;loGfx.DrawLine(.Pens.Black, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;This&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Width&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;/2, 0, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;This&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;Width&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;/2, 10)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;* Restore the original Gfx rotation state&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;loGfx.ResetTransform()&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDFOR&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp; ENDIF&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;ENDWITH&lt;BR&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Enjoy !!!&lt;/P&gt;&lt;A href="/files/vfpimaging/foxcharts/gauge/gauge.zip"&gt;Download Gauge Prototype sample with GdiPlusX&lt;/A&gt;&lt;img src="http://weblogs.foxite.com/aggbug.aspx?PostID=8242" width="1" height="1"&gt;</description><category domain="http://weblogs.foxite.com/vfpimaging/archive/category/187.aspx">GDI+ AND IMAGES</category></item><item><title>Drawing Unicode texts with GdiPlusX</title><link>http://weblogs.foxite.com/vfpimaging/archive/2009/03/01/7806.aspx</link><pubDate>Sun, 01 Mar 2009 11:58:00 GMT</pubDate><guid isPermaLink="false">8827bd1c-7596-4a8f-b0de-f59ce9ede522:7806</guid><dc:creator>cesarchalom</dc:creator><slash:comments>1</slash:comments><comments>http://weblogs.foxite.com/vfpimaging/comments/7806.aspx</comments><wfw:commentRss>http://weblogs.foxite.com/vfpimaging/commentrss.aspx?PostID=7806</wfw:commentRss><wfw:comment>http://weblogs.foxite.com/rsscomments/7806.aspx</wfw:comment><description>&lt;P&gt;We forgot to add to GdiPlusX a specific function to allow sending Unicodes directly, similar to the function DrawString.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But as you'll see below, it's really simple to adapt the original function and provide this possibility:&lt;/P&gt;
&lt;P&gt;In the sample below you'll see the function "&lt;STRONG&gt;&lt;EM&gt;DrawStringW&lt;/EM&gt;&lt;/STRONG&gt;", that is just an adapted version from the original xfcGraphics.DrawString function.&lt;/P&gt;
&lt;P&gt;It accepts the same parameters and overloads from the&amp;nbsp;original function - the sole difference is the first parameter that was introduced - the Graphics object.&lt;/P&gt;
&lt;P&gt;Another helper function - "&lt;STRONG&gt;&lt;EM&gt;HexToUnicode&lt;/EM&gt;&lt;/STRONG&gt;" was introduced. It converts a string containing Hex values separated by a space into the Unicode needed by GdiPlus.dll to&amp;nbsp; draw the string.&lt;/P&gt;
&lt;P&gt;Just run the script and you'll obtain a result similar to the one below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="/photos/cesarchalom/images/7807/original.aspx" border=0&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Prerequisites&lt;/STRONG&gt;&lt;BR&gt;Visual FoxPro 9 and the GdiPlusX library from VFPX&amp;nbsp;&lt;IMG src="http://www.codeplex.com/VFPX/Project/FileDownload.aspx?DownloadId=3280"&gt; &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Please make sure that you have the latest version, because this sample may be using&amp;nbsp;some functions that were added or fixed recently. &lt;BR&gt;&lt;A href="http://www.codeplex.com/VFPX/Wiki/View.aspx?title=GDIPlusX&amp;amp;referringTitle=Home"&gt;&lt;FONT color=#02469b&gt;http://www.codeplex.com/VFPX/Wiki/View.aspx?title=GDIPlusX&amp;amp;referringTitle=Home&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;DO LOCFILE&lt;FONT color=#000000&gt;("System.App")&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;n, x, y, lnColor&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;loBmp &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;as &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;xfcBitmap, loGfx &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;as &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;xfcGraphics, loFont &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;as &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;xfcFont&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;loBrush &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;as &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;xfcSolidBrush&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;laWords(9,2)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Greek&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;laWords(1,1) = "Greek"&lt;BR&gt;laWords(1,2) = "03B5 03B9 03C1 03AE 03BD 03B7"&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Korean&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;laWords(2,1) = "Korean"&lt;BR&gt;laWords(2,2) = "D3C9 D654" &lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Hebrew&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;laWords(3,1) = "Hebrew"&lt;BR&gt;laWords(3,2) = "05E9 05DC 05D5 05DD"&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Bulgarian&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;laWords(4,1) = "Bulgarian"&lt;BR&gt;laWords(4,2) = "043C 0438 0440" &lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Arabic&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;laWords(5,1) = "Arabic"&lt;BR&gt;laWords(5,2) = "0633 0644 0627 0645"&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Simplified Chinese&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;laWords(6,1) = "Chinese"&lt;BR&gt;laWords(6,2) = "548C 5E73" &lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Thai&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;laWords(7,1) = "Thai"&lt;BR&gt;laWords(7,2) = "0E04 0E27 0E32 0E21 0E2A 0E07 0E1A" &lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Russian&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;laWords(8,1) = "Russian"&lt;BR&gt;laWords(8,2) = "043C 0438 0440" &lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;* Japanese&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;laWords(9,1) = "Japanese"&lt;BR&gt;laWords(9,2) = "5E73 548C" &lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;WITH _Screen&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;System&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;.Drawing&lt;BR&gt;loFont = .&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Font&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;.New("Tahoma", 18)&lt;BR&gt;loBmp = .&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Bitmap&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;.New(350,370)&lt;BR&gt;loGfx = .Graphics.FromImage(loBmp)&lt;BR&gt;loGfx.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Clear&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;(.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Color&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;.White)&lt;BR&gt;loGfx.DrawString("Gdi+X Drawing Unicodes", loFont,;&lt;BR&gt;&amp;nbsp;&amp;nbsp; .Brushes.Black, 10,5)&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;FOR &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;n = 1 &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;TO &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;9&lt;BR&gt;&amp;nbsp;&amp;nbsp; y = n * 35&lt;BR&gt;&amp;nbsp;&amp;nbsp; x = 160&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; lnColor = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;RGB&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;RAND&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;() * 255, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;RAND&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;() * 255, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;RAND&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;() * 255)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;* Create a SolidBrush with randomic color&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&amp;nbsp; loBrush = .SolidBrush.New(.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Color&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;.FromRGB(lnColor))&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;* Draw the language name&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&amp;nbsp; loGfx.DrawString(laWords(n,1), .&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Font&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;.New("Tahoma", 10),;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Brushes.Black, 65, y + 5)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;* Draw the text in Unicodes&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&amp;nbsp; =DrawStringW(loGfx, HexToUnicode(laWords(n,2)), loFont,;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; loBrush, x, y)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;ENDFOR &lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;loBmp.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;Save&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;("TestUnicodes.Png", .Imaging.ImageFormat.Png)&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;ENDWITH &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;FUNCTION &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;DrawStringW(toGfx, ;&lt;BR&gt;&amp;nbsp;&amp;nbsp; tcString, toFont &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;AS &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;xfcFont, toBrush &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;AS &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;xfcBrush, tnX, tnY ;&lt;BR&gt;&amp;nbsp;&amp;nbsp; , toFormat &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;AS &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;xfcStringFormat)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&amp;nbsp;&amp;nbsp; *********** tcString, toFont AS xfcFont, toBrush AS xfcBrush, toPoint AS xfcPointF ;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&amp;nbsp; , toFormat &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;AS &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;xfcStringFormat&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&amp;nbsp;&amp;nbsp; *********** tcString, toFont AS xfcFont, toBrush AS xfcBrush, toRectangle AS xfcRectangleF ;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&amp;nbsp; , toFormat &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;AS &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;xfcStringFormat&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;lqLayoutRect&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;lnWidth, lnHeight, loPoint &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;AS &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;xfcPointF, loRect &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;AS &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;xfcRectangleF&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;lhFormat&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;STORE &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;0 &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;TO &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;lnWidth, lnHeight&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;STORE NULL TO &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;loPoint, loRect&lt;BR&gt;m.lqLayoutRect = 0h00&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;** Handle overload parameters&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;DO CASE&lt;BR&gt;CASE VARTYPE&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;(tnX) = "N"&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;CASE VARTYPE&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;(tnX) = "O" AND &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;INLIST&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;(tnX.BaseName,"Point","PointF")&lt;BR&gt;&amp;nbsp;&amp;nbsp; m.loPoint = m.tnX&lt;BR&gt;&amp;nbsp;&amp;nbsp; m.toFormat = m.tnY&lt;BR&gt;&amp;nbsp;&amp;nbsp; m.loPoint.GetExtent(@tnX, @tnY)&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;CASE VARTYPE&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;(tnX) = "O" AND &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;INLIST&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;(tnX.BaseName,"Rectangle","RectangleF")&lt;BR&gt;&amp;nbsp;&amp;nbsp; m.loRect = m.tnX&lt;BR&gt;&amp;nbsp;&amp;nbsp; m.toFormat = m.tnY&lt;BR&gt;&amp;nbsp;&amp;nbsp; m.loRect.GetExtent(@tnX, @tnY, @lnWidth, @lnHeight)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;ENDCASE&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;&lt;FONT face="Courier New" color=#008000&gt;** Optional parameter&lt;BR&gt;** The C++ classes show this parameter as NULL if not specified&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;IF VARTYPE&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;(m.toFormat) = "O"&lt;BR&gt;&amp;nbsp;&amp;nbsp; m.lhFormat = m.toFormat.Handle&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;ELSE&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&amp;nbsp; m.lhFormat = 0&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;ENDIF&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;m.lqLayoutRect = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;BINTOC&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;(m.tnX,"F")+&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;BINTOC&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;(m.tnY,"F")+;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&amp;nbsp;&amp;nbsp; BINTOC&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;(m.lnWidth,"F")+&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;BINTOC&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;(m.lnHeight,"F")&lt;BR&gt;&lt;BR&gt;=xfcGdipDrawString(toGfx.Handle, m.tcString+0h00, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;LENC&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;(tcString)/2, ;&lt;BR&gt;&amp;nbsp;&amp;nbsp; m.toFont.Handle, @lqLayoutRect, m.lhFormat, m.toBrush.Handle)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;ENDFUNC&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&amp;nbsp;&lt;BR&gt;FUNCTION &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;HexToUnicode(tcHex)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;LOCAL &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;n, lcHex, lcUnicode&lt;BR&gt;&amp;nbsp;&amp;nbsp; lcUnicode = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;SPACE&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;(0)&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;FOR &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;n = 1 &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;TO GETWORDCOUNT&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;(tcHex, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;SPACE&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;(1))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcHex = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;EVALUATE&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;("0x" + &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;GETWORDNUM&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;(tcHex, n, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;SPACE&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;(1)))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lcUnicode = lcUnicode + &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;BINTOC&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;(lcHex, "4RS")&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;ENDFOR&amp;nbsp;&lt;BR&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;RETURN &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;lcUnicode&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;FONT face="Courier New" color=#0000ff&gt;ENDFUNC&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://weblogs.foxite.com/aggbug.aspx?PostID=7806" width="1" height="1"&gt;</description></item><item><title>Convert your buttons to BMPs keeping transparency with GdiPlusX - REVISITED</title><link>http://weblogs.foxite.com/vfpimaging/archive/2008/12/15/7441.aspx</link><pubDate>Mon, 15 Dec 2008 01:49:00 GMT</pubDate><guid isPermaLink="false">8827bd1c-7596-4a8f-b0de-f59ce9ede522:7441</guid><dc:creator>cesarchalom</dc:creator><slash:comments>4</slash:comments><comments>http://weblogs.foxite.com/vfpimaging/comments/7441.aspx</comments><wfw:commentRss>http://weblogs.foxite.com/vfpimaging/commentrss.aspx?PostID=7441</wfw:commentRss><wfw:comment>http://weblogs.foxite.com/rsscomments/7441.aspx</wfw:comment><description>&lt;P&gt;This is just an update for an old post with the same title. Erik Gomez and Russel Campbell had some problems on the conversions of some specific PNG images, so I recoded this function, this time using a safer code.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size=4&gt;NEW UPDATE:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Thanks to Bernard Bout and Craig Boyd, I've updated the code below. In fact it contained a small bug, that was not adjusting the White colors. Now it seems to be working nice. Thanks !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This runs a little bit slower than the other aproach, but in my tests, the success was 100%.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The function below converts any button image to a BMP to be used in VFP forms.&lt;/P&gt;
&lt;P&gt;There are lots of cool and free icons available on the web, but the vast majority are in .ICO, GIF&amp;nbsp;or PNG image formats, that are not very familiar and reliable to be used in VFP. For us, the best image format, for a lot of reasons, is the BMP format.&lt;/P&gt;
&lt;P&gt;Some transformations are needed to make this BMP to show exactly how we desire, specially when converting source images in a PNG, GIF or ICO formats.&lt;/P&gt;
&lt;P&gt;VFP shows the pure white - RGB(255,255,255) as transparent in our buttons and image objects. The code below first converts the original whites to RGB(254,254,254) that is visually the same, but does not become transparent, and eliminates the need to create a mask image (.MSK) and next, converts the background color of the original bitmap to pure white, that will show transparent in VFP forms.&lt;/P&gt;
&lt;P&gt;For more details, please check these prior posts:&lt;/P&gt;
&lt;P&gt;&lt;A id=_ctl0__ctl1_bcr_Aggregatepostlist1___Posts___Posts__ctl15_TitleLink href="/cesarchalom/archive/2007/10/24/5190.aspx"&gt;BMPs with Transparent Backgrounds&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A id=_ctl0__ctl1_bcr_Aggregatepostlist1___Posts___Posts__ctl11_TitleLink href="/cesarchalom/archive/2007/10/30/5252.aspx"&gt;How to put one image over another in a form&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;IMPORTANT&lt;/FONT&gt; &lt;BR&gt;&lt;/STRONG&gt;Requires VFP9 and GdiPlusX to run.&amp;nbsp; &lt;IMG src="http://www.codeplex.com/VFPX/Project/FileDownload.aspx?DownloadId=3280"&gt; &lt;BR&gt;Please make sure that you have the latest version, because this sample may be using&amp;nbsp;some functions that were added or fixed recently. &lt;BR&gt;&lt;A href="http://www.codeplex.com/VFPX/Wiki/View.aspx?title=GDIPlusX&amp;amp;referringTitle=Home"&gt;&lt;FONT color=#02469b&gt;http://www.codeplex.com/VFPX/Wiki/View.aspx?title=GDIPlusX&amp;amp;referringTitle=Home&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Save the program below as BUTTON2BMP.PRG, and call it this way:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;Button2Bmp(&lt;FONT color=#0000ff&gt;GETPICT&lt;/FONT&gt;(), "c:\NewIcon.bmp")&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;When you compile this program in your executable, please don't forget to remove the &lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#0000ff&gt;LOCFILE&lt;/FONT&gt;()&lt;/FONT&gt; command, and just use a &lt;FONT face="Courier New" size=2&gt;&lt;STRONG&gt;DO System.App&lt;/STRONG&gt;&lt;/FONT&gt; instead&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT color=#0000ff&gt;LPARAMETERS&lt;/FONT&gt; &lt;FONT color=#000000&gt;tcSourceFile, tcDestFile&lt;/FONT&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class=codeblock&gt;&lt;FONT color=#006400&gt;* tcSourcefile = GETPICT()
* tcDestFile = FORCEEXT(tcSourceFile, "Bmp")&lt;/FONT&gt;

&lt;FONT color=blue&gt;DO&lt;/FONT&gt; &lt;FONT color=blue&gt;LOCFILE&lt;/FONT&gt;(&lt;FONT color=black&gt;"System.App"&lt;/FONT&gt;)

&lt;FONT color=blue&gt;LOCAL&lt;/FONT&gt; loBmp &lt;FONT color=blue&gt;AS&lt;/FONT&gt; xfcBitmap
&lt;FONT color=blue&gt;LOCAL&lt;/FONT&gt; loGfx &lt;FONT color=blue&gt;AS&lt;/FONT&gt; xfcGraphics
&lt;FONT color=blue&gt;LOCAL&lt;/FONT&gt; loBorderClr &lt;FONT color=blue&gt;AS&lt;/FONT&gt; xfcColor
&lt;FONT color=blue&gt;LOCAL&lt;/FONT&gt; loRect &lt;FONT color=blue&gt;AS&lt;/FONT&gt; xfcRectangle
&lt;FONT color=blue&gt;LOCAL&lt;/FONT&gt; loAttr &lt;FONT color=blue&gt;AS&lt;/FONT&gt; xfcImageAttributes
&lt;FONT color=blue&gt;LOCAL&lt;/FONT&gt; loColorMap &lt;FONT color=blue&gt;AS&lt;/FONT&gt; xfcColorMap
&lt;FONT color=blue&gt;LOCAL&lt;/FONT&gt; loDestBmp &lt;FONT color=blue&gt;as&lt;/FONT&gt; xfcBitmap
 
&lt;FONT color=blue&gt;WITH&lt;/FONT&gt; &lt;FONT color=blue&gt;_SCREEN&lt;/FONT&gt;.&lt;FONT color=blue&gt;SYSTEM&lt;/FONT&gt;.Drawing
	loColorMap = .Imaging.ColorMap.&lt;FONT color=blue&gt;New&lt;/FONT&gt;()
	loAttr = .Imaging.ImageAttributes.&lt;FONT color=blue&gt;New&lt;/FONT&gt;()
	loBmp = .&lt;FONT color=blue&gt;Bitmap&lt;/FONT&gt;.FromFile(tcSourceFile)
	loGfx = .Graphics.FromImage(loBmp)

	loDestBmp = .&lt;FONT color=blue&gt;Bitmap&lt;/FONT&gt;.&lt;FONT color=blue&gt;New&lt;/FONT&gt;(loBmp.&lt;FONT color=blue&gt;Width&lt;/FONT&gt;, loBmp.&lt;FONT color=blue&gt;Height&lt;/FONT&gt;, .Imaging.PixelFormat.Format24bppRGB)
	loDestGfx = .Graphics.FromImage(loDestBmp)

&lt;FONT color=green&gt;	* Clear the new bitmap&lt;/FONT&gt;
	loDestGfx.&lt;FONT color=blue&gt;Clear&lt;/FONT&gt;(.&lt;FONT color=blue&gt;Color&lt;/FONT&gt;.White)

&lt;FONT color=green&gt;	* By Craig Boyd - For enhancing the smoothless and quality&lt;/FONT&gt;
	loDestGfx.SmoothingMode     = .Drawing2D.SmoothingMode.HighQuality 
	loDestGfx.InterpolationMode = .Drawing2D.InterpolationMode.HighQualityBicubic
	loDestGfx.PixelOffsetMode   = .Drawing2D.PixelOffsetMode.HighQuality

	loRect = loBmp.GetBounds()

&lt;FONT color=green&gt;	* Get the top left pixel color, presuming this color is the BackGround color to become transparent&lt;/FONT&gt;
&lt;FONT color=green&gt;	* For our BMP case, this will become PURE WHITE - RGB(255,255,255)&lt;/FONT&gt;
&lt;FONT color=green&gt;	* that becomes transparent when used in VFP objects&lt;/FONT&gt;
	loBorderClr = loBmp.GetPixel(0,0)

&lt;FONT color=green&gt;	* Convert original Whites RGB(255,255,255) to OFF WHITE - RGB(254,254,254)&lt;/FONT&gt;
&lt;FONT color=green&gt;	* this way, the whites will remain without the need of a mask&lt;/FONT&gt;
	loColorMap.OldColor = .&lt;FONT color=blue&gt;Color&lt;/FONT&gt;.White
	loColorMap.NewColor = .&lt;FONT color=blue&gt;Color&lt;/FONT&gt;.FromARGB(255,254,254,254)

	loAttr.SetRemapTable(loColorMap)
	loDestGfx.DrawImage(loBmp, loRect, loRect, .GraphicsUnit.Pixel, loAttr)

&lt;FONT color=green&gt;	* Next step, convert the borders to pure White, RGB(255,255,255) that will become transparent in buttons&lt;/FONT&gt;
	loColorMap.OldColor = loBorderClr
	loColorMap.NewColor = .&lt;FONT color=blue&gt;Color&lt;/FONT&gt;.White
	loAttr.SetRemapTable(loColorMap)

	loDestGfx.DrawImage(loDestBmp, loRect, loRect, .GraphicsUnit.Pixel, loAttr)

	loDestBmp.&lt;FONT color=blue&gt;Save&lt;/FONT&gt;(tcDestFile, .Imaging.ImageFormat.Bmp)
&lt;FONT color=blue&gt;ENDWITH&lt;/FONT&gt;
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://weblogs.foxite.com/aggbug.aspx?PostID=7441" width="1" height="1"&gt;</description><category domain="http://weblogs.foxite.com/vfpimaging/archive/category/187.aspx">GDI+ AND IMAGES</category></item><item><title>FoxCharts 0.40 BETA Released</title><link>http://weblogs.foxite.com/vfpimaging/archive/2008/06/30/6353.aspx</link><pubDate>Mon, 30 Jun 2008 04:50:00 GMT</pubDate><guid isPermaLink="false">8827bd1c-7596-4a8f-b0de-f59ce9ede522:6353</guid><dc:creator>cesarchalom</dc:creator><slash:comments>15</slash:comments><comments>http://weblogs.foxite.com/vfpimaging/comments/6353.aspx</comments><wfw:commentRss>http://weblogs.foxite.com/vfpimaging/commentrss.aspx?PostID=6353</wfw:commentRss><wfw:comment>http://weblogs.foxite.com/rsscomments/6353.aspx</wfw:comment><description>&lt;P&gt;&lt;B&gt;New features:&lt;/B&gt; &lt;BR&gt;- Vertical lines and bars in the scale background &lt;BR&gt;- Alpha allowed in all of the chart shapes and in scale background &lt;BR&gt;- Triangular and cylinder&amp;nbsp;bar charts &lt;BR&gt;- Angles compensation for pie and doughnut charts, allowing charts with good precision when width is bigger than the height (by &lt;A href="http://blog.moxiedata.com/"&gt;Bo Durban&lt;/A&gt;). &lt;BR&gt;- New sample, see: FoxCharts_New, that allows you to interactively change almost every property of the charts, creating lots of different and interesting charts.&lt;BR&gt;- Included an EXE sample project, for testing purposes &lt;BR&gt;- BackGround line of chart can be set in width, and also use some predefined dotted lines &lt;BR&gt;- Hiding slices from pies or doughnuts allowed &lt;BR&gt;- MemberData scripts for picking colors - in the properties window, double clicking any property that receives a color, will fire the colorpicker window &lt;BR&gt;- Colors may be passed using the RGB value, or using a VFP expression, like: "=RGB(0,0,255)" or even just like the way VFP uses for its native color properties: "0,0,255".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Lots of fixes were applied in this version&lt;/B&gt; &lt;BR&gt;- Fixed cylinder and bars positions. &lt;BR&gt;- Fixed font assignment &lt;BR&gt;- Fixed class initialization that caused erros &lt;BR&gt;- Now the class does not show the "X" image in the class initialization &lt;BR&gt;- Fixed plain gradient Pie chart bug, that sometimes did not show the chart &lt;BR&gt;- Fixed print command &lt;BR&gt;- FoxCharts resizes faster &lt;BR&gt;- .... and many minor other fixes&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;B&gt;SPECIAL THANKS:&lt;/B&gt; &lt;BR&gt;To the FoxBrazilian friends: Peter Wagner, Grego, &lt;A HREF="/emersonreed/"&gt;Emerson Reed&lt;/A&gt;, Minari, Moshe, Arcadio, Edgar, Paulo Henrique, Ninja Takehana, Walfrans, Joni and others for their extensive testing, and for providing important suggestions. &lt;BR&gt;And also: &lt;BR&gt;&lt;A href="http://blog.moxiedata.com/"&gt;Bo Durban &lt;/A&gt;(the best) and &lt;A href="http://www.ctl32.com.ar/"&gt;Carlos Alloatti&lt;/A&gt; (always there, with great insights) &lt;BR&gt;These guys have been providing important help and support. &lt;STRONG&gt;THANKS VERY MUCH&lt;/STRONG&gt; !&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;Any feedback will be very much appreciated. &lt;BR&gt;If you would like to contribute, find any bug or would like to have some specific features, feel free to post in the VFPX Discussions forum or send directly a message to &lt;A href="mailto:vfpimaging@hotmail.com"&gt;vfpimaging@hotmail.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Get the latest release directly from the VFPX&amp;nbsp; / &lt;A href="http://www.codeplex.com/VFPX/Wiki/View.aspx?title=FoxCharts&amp;amp;referringTitle=Home"&gt;FoxCharts&lt;/A&gt; page at Codeplex:&lt;/P&gt;
&lt;P&gt;&lt;A title=http://www.codeplex.com/VFPX/Release/ProjectReleases.aspx?ReleaseId=14851 href="http://www.codeplex.com/VFPX/Release/ProjectReleases.aspx?ReleaseId=14851"&gt;http://www.codeplex.com/VFPX/Release/ProjectReleases.aspx?ReleaseId=14851&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below are some pictures showing what &lt;A href="http://www.codeplex.com/VFPX/Wiki/View.aspx?title=FoxCharts&amp;amp;referringTitle=Home"&gt;FoxCharts&lt;/A&gt; can do so far:&lt;/P&gt;
&lt;P&gt;Enjoy !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\STACKEDAREA.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\STACKEDBARS.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\TRIANGLE1.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\MULTITRIANGLE.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\MULTIBARS.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\PIEHIDESLICES.PNG"&gt; &lt;BR&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\3DAREAGRAD.PNG"&gt; &lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\3DDONUTRANDOM.PNG"&gt;&amp;nbsp;&lt;BR&gt;&lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\3DDONUTVARIABLE2.PNG"&gt; &lt;BR&gt;&lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\3DLINERANDOM.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\3DPIEGRAD.PNG"&gt; &lt;BR&gt;&lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\3DPIESOLID.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\AREA3DTRANSP.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\ARES3D2.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\BARS13D.PNG"&gt; &lt;BR&gt;&lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\CYL2.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\CYLMONOCH.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\CYLMULTI.PNG"&gt; &lt;BR&gt;&lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\DONUTCAPTION.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\DONUTCLOSED.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\DONUTDETACH.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\DONUTTRANSP.PNG"&gt; &lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\imagem3.PNG"&gt; &lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\LINE3DNOSCALE.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\LINE3DTRANSP.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\LINEMAIN.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\MULTIBAR2.PNG"&gt; &lt;BR&gt;&lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\MULTIPMONOCH.PNG"&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\PIETRANSP.PNG"&gt; &lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\POINTMAIN.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\POINTMONOCHR.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\rEPORT.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\sampleform.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\STACKAREA1.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\STACKAREA2.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\STACKAREA3.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\STACKED3D.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\STACKED3D2.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\STACKED3D3.PNG"&gt; &lt;BR&gt;&lt;IMG src="http:\\weblogs.foxite.com\files\vfpimaging\foxcharts\STACKED3DAXYS.PNG"&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&lt;img src="http://weblogs.foxite.com/aggbug.aspx?PostID=6353" width="1" height="1"&gt;</description><category domain="http://weblogs.foxite.com/vfpimaging/archive/category/187.aspx">GDI+ AND IMAGES</category><category domain="http://weblogs.foxite.com/vfpimaging/archive/category/1029.aspx">VFP in General</category></item><item><title>Full Justified texts in reports with GdiPlusX - REVISITED</title><link>http://weblogs.foxite.com/vfpimaging/archive/2008/06/15/6268.aspx</link><pubDate>Sun, 15 Jun 2008 03:46:00 GMT</pubDate><guid isPermaLink="false">8827bd1c-7596-4a8f-b0de-f59ce9ede522:6268</guid><dc:creator>cesarchalom</dc:creator><slash:comments>7</slash:comments><comments>http://weblogs.foxite.com/vfpimaging/comments/6268.aspx</comments><wfw:commentRss>http://weblogs.foxite.com/vfpimaging/commentrss.aspx?PostID=6268</wfw:commentRss><wfw:comment>http://weblogs.foxite.com/rsscomments/6268.aspx</wfw:comment><description>&lt;P&gt;As I've shown in a &lt;A href="/vfpimaging/archive/2007/04/05/3641.aspx"&gt;previous post&lt;/A&gt; from last year, this is totally possible for us in VFP, using the GdiPlusX library together with ReportListeners, remember?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="/photos/cesarchalom/images/3589/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;BUT I've been receiving some emails about the Full-Justified ReportListener I published last year.&lt;/P&gt;
&lt;P&gt;It did not deal with the possibility of multipage reports. In fact, when a string that had to be printed in FullJustified mode had to be divided in more than one page, in the next page the whole string was redrawn.&lt;/P&gt;
&lt;P&gt;To solve this, I needed to make some adjustments in the report listener source, more specifically in the "Render" event, in order to deal with the parameters "nObjectContinuationType" and "cContentsToBeRendered". I had totally missed them. In the first version, I was only using the "Text" property that I retrieved in the "EvaluateContents" method. The first tells us if the text could be totally drawn, or partially. The 2nd, brings the text that is to be drawn, not the whole text.&lt;/P&gt;
&lt;P&gt;It's amazing how we can control our output with all these new enhancements from the VFP9 Reporting System. In fact, we can control almost everything ! &lt;/P&gt;
&lt;P&gt;It's a pity I couldn't explore this tool as much as I would like, the possibilities seem to be infinite.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In HELP I found all the info I needed to fix it:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT color=#00bbbb&gt;&lt;FONT color=#000000&gt;&lt;STRONG&gt;&lt;U&gt;nObjectContinuationType&lt;/U&gt;&lt;/STRONG&gt; &lt;/FONT&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#408080&gt;* Indicates the current continuation state for the rendered element. When layout elements span pages, they are rendered in multiple sections (once for each page). &lt;BR&gt;* Value&amp;nbsp; Continuation Type&amp;nbsp; &lt;BR&gt;*&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; Complete (no continuation). &lt;BR&gt;*&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; Start of layout element occurrence, will not finish on the current page. &lt;BR&gt;*&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp; Mid-element, neither started nor finished on the current page. &lt;BR&gt;*&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp; End of element, completed on the current page.&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;U&gt;cContentsToBeRendered&lt;/U&gt;&lt;/STRONG&gt; &lt;BR&gt;&lt;FONT color=#408080&gt;* Indicates the text to be rendered for Expression (Field) and Label layout elements. &lt;BR&gt;* If your derived class sends the text value through some additional processing, such as storage in a table, you can use the STRCONV() function, and its optional regional script parameter, to convert the string to DBCS first. For more information, see STRCONV( ) Function.&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some important tweaks and fixes were needed in the GdiPlusX library too, more specifically in the xfcGraphics.DrawStringJustified function. I added to it a new parameter, "tlJustifyLast", in order fo force the justifying in the last sentence. This is for the case of reports, when an unfinished sentence needs to be justified as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The source code is below, you can adapt it to your needs !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The idea is to add a "&lt;STRONG&gt;&amp;lt;FJ&amp;gt;&lt;/STRONG&gt;" tag in the USER tab or in the beginning of any string from a textbox in a report, to tell the ReportListener that it will draw the text using the &lt;STRONG&gt;DRAWSTRINGJUSTIFIED &lt;/STRONG&gt;method from GdiPlusX. Special thanks to Victor Espinoza, from Miami, FL, for his important feedback, suggestions and fixes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The "&lt;STRONG&gt;FullJustifyListener&lt;/STRONG&gt;" performs the following actions: &lt;/P&gt;
&lt;P&gt;- Initializes GdiPlusX &lt;/P&gt;
&lt;P&gt;- Creates a GDI+ Graphics object that will be used to draw in the report &lt;/P&gt;
&lt;P&gt;- Stores in an array the required information needed to draw the string(Font, Size, Style and Color) &lt;/P&gt;
&lt;P&gt;- Before Rendering the string, checks if the "&amp;lt;FJ&amp;gt;" tag is at the beginning of text or at the "USER" tab in the report designer - if yes, draws the string using the new method. &lt;/P&gt;
&lt;H6&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/H6&gt;
&lt;H5&gt;&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H5&gt;
&lt;H5&gt;&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H5&gt;
&lt;H5&gt;&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H5&gt;
&lt;P&gt;Here are the steps for you to bring this to your reports:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;1 - Download the updated GdiPlusX library - the System.App file&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;H5&gt;&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;VERY IMPORTANT - READ THIS !&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H5&gt;
&lt;P&gt;This report listener needs the updated version of the GdiPlusX main file of the library, "System.App". As it will take some time till a new version will be released, I've uploaded this file separately, so that people can try this feature from now.&lt;/P&gt;
&lt;P&gt;Go to this link: &lt;A title=http://www.codeplex.com/VFPX/Release/ProjectReleases.aspx?ReleaseId=8606 href="http://www.codeplex.com/VFPX/Release/ProjectReleases.aspx?ReleaseId=8606"&gt;http://www.codeplex.com/VFPX/Release/ProjectReleases.aspx?ReleaseId=8606&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;And download the file "&lt;FONT color=#8080ff&gt;GdiPlusX Updated System.App for FullJustified purposes&lt;/FONT&gt;"&lt;/P&gt;
&lt;P&gt;If you prefer, this file is found in the &lt;A href="/files/vfpimaging/fjlistener/FJListener.rar"&gt;downloadable source code from this article&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="/files/vfpimaging/fjlistener/FJ_Download.png"&gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2 - Save the ReportListener:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Please Copy and Paste the code below, and save it as &lt;STRONG&gt;FJLISTENER.PRG&lt;/STRONG&gt; in the samples folder of GdiPlusX&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;* Program : FJLISTENER.PRG &lt;BR&gt;* Version : 2.0 &lt;BR&gt;* Purpose : Provides a Report Listener that allows rendering text in &lt;BR&gt;* Full Justify alignment. &lt;BR&gt;* Authors : Cesar Ch &lt;/FONT&gt;&lt;U&gt;&lt;FONT face="Courier New" size=2&gt;http://weblogs.foxite.com/vfpimaging &lt;BR&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;* Class based on article "Listening to a report" by Doug Hennig &lt;BR&gt;* New tweaked version allows drawing strings that need to be divided in more than one page&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;* Special thanks to Victor Espinoza&amp;nbsp;&lt;BR&gt;* &lt;/FONT&gt;&lt;U&gt;&lt;FONT face="Courier New" size=2&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/ms947682.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms947682.aspx&lt;/A&gt; &lt;BR&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;DEFINE CLASS &lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;FullJustifyListener &lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;AS &lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;FXListener &lt;BR&gt;oGDIGraphics = &lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;NULL &lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;nSaveGraphicsHandle = 0 &lt;BR&gt;nTimes = 1 &lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;DIMENSION &lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;aRecords[1] &lt;BR&gt;&amp;nbsp; &lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;* Before we run the report, go through the FRX and store information about any &lt;BR&gt;* field with our expected directive in its USER memo into the aRecords array. &lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;FUNCTION BEFOREREPORT &lt;BR&gt;&amp;nbsp;&amp;nbsp; DODEFAULT&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;() &lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp; * Check if we already have the "System" object in "_Screen" &lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp; IF &lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;NOT &lt;/FONT