<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blog Informatico &#187; C#</title>
	<atom:link href="http://www.bloginformatico.net/tag/c/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bloginformatico.net</link>
	<description>L'informatica come non l'avete mai letta</description>
	<lastBuildDate>Sat, 08 Jan 2011 10:19:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Le novità di C# 4.0</title>
		<link>http://www.bloginformatico.net/2009/05/12/le-novit-di-c-40/</link>
		<comments>http://www.bloginformatico.net/2009/05/12/le-novit-di-c-40/#comments</comments>
		<pubDate>Tue, 12 May 2009 16:05:03 +0000</pubDate>
		<dc:creator>Massimo</dc:creator>
				<category><![CDATA[In rilievo]]></category>
		<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[.Net Framework 4.0]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[C# 4.0]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://www.bloginformatico.net/?p=436</guid>
		<description><![CDATA[Cosa ci aspetta con il nuovo linguaggio targato Microsoft?]]></description>
			<content:encoded><![CDATA[<p>Il nuovo Microsoft .Net Framework 4.0 è arrivato ad uno stato avanzato di sviluppo. Forse per fine anno o metà del prossimo potremmo beneficiare non solo di una moltitudine di nuove funzionalità del .net framework ma anche del nuovo Visual Studio 2010 realizzato interamente in WPF.</p>
<p>In questo articolo ci concentreremo esclusivamente sulle novità apportate al linguaggio C# 4.0. Molte delle novità descritte in questo articolo sono già testabili scaricando e installando la <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=922B4655-93D0-4476-BDA4-94CF5F8D4814&amp;displaylang=en">Microsoft Pre-release Software Visual Studio 2010 and .NET Framework 4.0 Community Technology Preview</a>. Si tratta di una macchina Virtual PC con dentro Windows, Visual Studio 2010 e il .net framework già installati e configurati. Per un totale di circa 7GB di macchina virtuale!</p>
<p>Complessivamente le novità introdotte in C# 4.0 si possono riassumere nel seguente elenco:</p>
<ol>
<li>Dynamic Type Object</li>
<li>Name e Optional Arguments</li>
<li>Co-variance e Contra-variance</li>
<li>Migliorie su COM Interop</li>
</ol>
<p>Vediamo in dettaglio.</p>
<h4>Dynamic Type Object</h4>
<p>Il Dynamic Type Object è un nuovo tipo statico introdotto soprattutto a beneficio del <strong>Dynamic Language Runtime (DLR).</strong> Con la nuova parola chiave <strong><em>dynamic</em></strong> è possibile dichiarare un type che verrà risolto solo a run-time. In questo modo:</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; line-height: 12pt; background-color: #f4f4f4; width: 97.88%; font-family: consolas,'Courier New',courier,monospace; height: 142px; max-height: 200px; font-size: 8pt; cursor: text;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"><span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> MyFunction()
{
    <span style="color: #008000">// le seguenti variabili verranno convertite</span>
    <span style="color: #008000">// implicitamente a run-time. </span>
    <span style="color: #0000ff">dynamic</span> counter = 1;
    <span style="color: #0000ff">dynamic</span> hello = <span style="color: #006080">"Hello C# 4.0"</span>;
}</pre>
</div>
<p>Su un type dichiarato come dynamic è possibile richiamare metodi, campi o proprietà, come se fosse un object. Il tutto verrà risolto automaticamente a run-time in base al type effettivo contenuto all’interno della variabile. Con questa parola chiave C# 4.0 si uniforma così ai tipici linguaggi dinamici (dynamic appunto) come Ruby o Php.</p>
<h4>Name e Optional Arguments</h4>
<p>L’optional argument è una funzionalità del linguaggio già presente in Visual Basic ed è la capacità di dichiarare come opzionale un parametro di un metodo, in questo modo:</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; line-height: 12pt; background-color: #f4f4f4; width: 97.5%; font-family: consolas,'Courier New',courier,monospace; max-height: 200px; font-size: 8pt; cursor: text;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"><span style="color: #008000">// il parametro i risulta essere obbligatorio</span>
<span style="color: #008000">// mentre il parametro y è optionale e per</span>
<span style="color: #008000">// default viene impostato a 0.</span>
<span style="color: #0000ff">public</span> <span style="color: #0000ff">int</span> Calc(<span style="color: #0000ff">int</span> i, <span style="color: #0000ff">int</span> y = 0)
{
    <span style="color: #008000">// corpo del metodo</span>
}

<span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> Main()
{
    <span style="color: #008000">// ho la possibilità di richiamare Calc con un</span>
    <span style="color: #008000">// solo parametro o con due, poiché il parametro</span>
    <span style="color: #008000">// y risulta essere opzionale.</span>
    <span style="color: #0000ff">int</span> result1 = Calc(5); <span style="color: #008000">// equivalente a Calc(5, 0);</span>
    <span style="color: #0000ff">int</span> result2 = Calc(10, 3)
}</pre>
</div>
<p>Il name argument invece è la facoltà di passare un parametro per nome, in questo modo:</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; line-height: 12pt; background-color: #f4f4f4; width: 97.5%; font-family: consolas,'Courier New',courier,monospace; height: 264px; max-height: 200px; font-size: 8pt; cursor: text;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"><span style="color: #0000ff">public</span> <span style="color: #0000ff">int</span> Calc(<span style="color: #0000ff">int</span> i, <span style="color: #0000ff">int</span> y = 0, <span style="color: #0000ff">int</span> z = 1)
{
    <span style="color: #008000">// corpo del metodo</span>
}

<span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> Main()
{
    <span style="color: #008000">// In questo modo chiamo il metodo Calc con i parametri</span>
    <span style="color: #008000">// invertiti, cioè prima passando y e poi x.</span>
    <span style="color: #0000ff">int</span> result = Calc(y: 3, i: 4); <span style="color: #008000">// equivalente a Calc(4, 3, 0);</span>

    <span style="color: #008000">// In questo, invece chiamo Calc passando i e z ma non y</span>
    <span style="color: #0000ff">int</span> result2 = Calc(z: 6, i: 3); <span style="color: #008000">// equivalente a Calc(3, 0, 6);</span>
}</pre>
</div>
<h4>Co-variance e Contra-variance</h4>
<p>Introduciamo il concetto di <strong>covarianza</strong> e <strong>contravarianza</strong>. Date due classi <em><strong>A </strong></em>e<em><strong> B</strong></em>. Dove <em><strong>B</strong></em> <strong>è una sotto classe di</strong> <em><strong>A</strong></em>, e avente una nuova classe <strong><em>C&lt;T&gt;</em></strong> si dice che <em><strong>C&lt;T&gt;</strong></em> è <strong>covariante</strong> rispetto a T se anche <em><strong>C&lt;B&gt;</strong></em> <strong>è una sotto classe di <em>C&lt;A&gt;</em></strong>. Mentre si dice che <em><strong>C&lt;T&gt;</strong></em> è <strong>contravariante</strong> rispetto a T se anche <strong><em>C&lt;A&gt;</em> è super classe di <em>C&lt;B&gt;</em>.</strong> In pratica:</p>
<ul>
<li>se <em><strong>B</strong></em> è sotto classe di <strong><em>A</em></strong></li>
<li>la classe <strong><em>C&lt;B&gt;</em></strong> è <strong>covariante</strong> rispetto a T con <em><strong>C&lt;A&gt;</strong></em> se <em><strong>C&lt;B&gt;</strong></em> è sotto classe di <strong><em>C&lt;A&gt;</em></strong></li>
<li>la classe <strong><em>C&lt;A&gt;</em></strong> è <strong>contravariante</strong> rispetto a T con <em><strong>C&lt;B&gt;</strong></em> se anche <em><strong>C&lt;A&gt;</strong></em> è super classe di <em><strong>C&lt;B&gt;</strong></em></li>
</ul>
<p>Questo risulta particolarmente interessante con i type parameter dei generics. In questo modo potremmo, per esempio, assegnare una collection di stringhe ad una collection di oggetti, dato che la classe string e sotto classe di object, o vice versa, così:</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; line-height: 12pt; background-color: #f4f4f4; width: 97.5%; font-family: consolas,'Courier New',courier,monospace; height: 79px; max-height: 200px; font-size: 8pt; cursor: text;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;">IList&lt;<span style="color: #0000ff">string</span>&gt; strings = <span style="color: #0000ff">new</span> List&lt;<span style="color: #0000ff">string</span>&gt;();
IList&lt;<span style="color: #0000ff">object</span>&gt; objects = strings;</pre>
</div>
<p>I benefici della covarianza e della contravarianza non si limitano a questo aspetto, ma come esempio è chiarificatore.</p>
<h4>Migliorie su Com Interop</h4>
<p>Tra le migliorie su Com Interop citiamo:</p>
<ul>
<li>Importazione dinamica con l’utilizzo del Dynamic Type Object invece che object</li>
<li>Compilazione senza PIA (Primary Interop Assemblies) che rendevano pensante l’applicazione</li>
<li>Chiamate a metodi senza l’utilizzo di ref</li>
</ul>
<h4>Conclusioni</h4>
<p>Che dire, le novità sono davvero tante e tutte decisamente interessanti. Prima tra tutte la citata parolina magica <strong>dynamic</strong>, che introduce una vera e propria rivoluzione per un linguaggio prettamente statico come C#. Non resta che aspettare l’uscita ufficiale sia del .Net Framework 4.0 ma soprattutto del nuovissimo Visual Studio 2010 che merita veramente la visione, ma questa è un‘altra storia. <img src='http://www.bloginformatico.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<h4>Risorse</h4>
<p>Alcune risorse utili:</p>
<ul>
<li><a href="http://tinyurl.com/PDC2008-NETFX4PDF">Il pdf del poster .Net Framework 4.0</a></li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=752cb725-969b-4732-a383-ed5740f02e93">Visual Studio 2010 and .NET Framework 4.0 Training Kit</a></li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=9f0b0214-9821-44e9-abd4-cf224f48757f">Mix It Up: Visual Studio 2010 and ASP.NET 4.0</a></li>
<li><a href="http://code.msdn.microsoft.com/csharpfuture">C# Future</a></li>
</ul>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:6cc00071-dd40-4561-ad2e-4ff0dd550194" class="wlWriterEditableSmartContent" style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px">Technorati Tags: <a rel="tag" href="http://technorati.com/tags/.Net+Framework">.Net Framework</a>,<a rel="tag" href="http://technorati.com/tags/.Net+Framework+4.0">.Net Framework 4.0</a>,<a rel="tag" href="http://technorati.com/tags/C%23">C#</a>,<a rel="tag" href="http://technorati.com/tags/C%23+4.0">C# 4.0</a>,<a rel="tag" href="http://technorati.com/tags/Visual+Studio">Visual Studio</a>,<a rel="tag" href="http://technorati.com/tags/Visual+Studio+2010">Visual Studio 2010</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.bloginformatico.net/2009/05/12/le-novit-di-c-40/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Diminuire l&#8217;effetto flickering aumentando le prestazioni in GDI+</title>
		<link>http://www.bloginformatico.net/2009/03/12/diminuire-leffetto-flickering-aumentando-le-prestazioni-in-gdi/</link>
		<comments>http://www.bloginformatico.net/2009/03/12/diminuire-leffetto-flickering-aumentando-le-prestazioni-in-gdi/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 16:32:10 +0000</pubDate>
		<dc:creator>Massimo</dc:creator>
				<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Flickering]]></category>
		<category><![CDATA[GDI+]]></category>
		<category><![CDATA[Windows Form]]></category>

		<guid isPermaLink="false">http://www.bloginformatico.net/?p=140</guid>
		<description><![CDATA[Quando si iniziare ad utilizzare GDI+ nel .NET Framework il primo problema da affrontare è il così detto effetto flickering. Il flickering è quel fastidioso sfarfallio che vediamo quando disegniamo un oggetto in GDI+, come un rettangolo o un cerchio. Esistono numerosi trucchetti per togliere, almeno parzialmente, questo problema e contemporaneamente aumentare le prestazioni grafiche. [...]]]></description>
			<content:encoded><![CDATA[<p>Quando si iniziare ad utilizzare GDI+ nel .NET Framework il primo problema da affrontare è il così detto effetto <em><a href="http://en.wikipedia.org/wiki/Flicker_(screen)">flickering</a></em>. Il flickering è quel fastidioso sfarfallio che vediamo quando disegniamo un oggetto in <strong>GDI+</strong>, come un rettangolo o un cerchio.</p>
<p>Esistono numerosi trucchetti per togliere, almeno parzialmente, questo problema e contemporaneamente aumentare le prestazioni grafiche. Il primo consiglio è quello di impostare la proprietà <em><strong>DoubleBuffer</strong></em> della Windows Form a <em><strong>True</strong></em>. Anche se il consumo di memoria aumenterà le prestazioni ne beneficeranno. Inoltre è bene impostare altre proprietà interessanti. Possiamo fare tutto in un colpo solo impostando un&#8217;insieme di stili nel costruttore della windows form. In questo modo:</p>
<div>
<div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">   1:</span> <span style="color: #0000ff">public</span> Form1()</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">   2:</span> {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">   3:</span>     <span style="color: #0000ff">this</span>.InitializeComponent();</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">   4:</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">   5:</span>     <span style="color: #0000ff">this</span>.SetStyle(ControlStyles.UserPaint, <span style="color: #0000ff">true</span>);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">   6:</span>     <span style="color: #0000ff">this</span>.SetStyle(ControlStyles.AllPaintingInWmPaint, <span style="color: #0000ff">true</span>);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">   7:</span>     <span style="color: #0000ff">this</span>.SetStyle(ControlStyles.DoubleBuffer, <span style="color: #0000ff">true</span>);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">   8:</span>     <span style="color: #0000ff">this</span>.SetStyle(ControlStyles.ResizeRedraw, <span style="color: #0000ff">true</span>);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">   9:</span>     <span style="color: #0000ff">this</span>.SetStyle(ControlStyles.OptimizedDoubleBuffer, <span style="color: #0000ff">true</span>);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">  10:</span>     <span style="color: #0000ff">this</span>.UpdateStyles();</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">  11:</span> }</pre>
</div>
</div>
<p>Questo sistema dovrebbe bastare per ridurre notevolmente il flickering. Ma se volete spingere al massimo le prestazioni c&#8217;è ancora una cosa che si può fare: utilizzare un&#8217;immagine bitmap come buffer ulteriore. In questo modo gli oggetti vengono prima disegnati sulla bitmap di buffer e successivamente la bitmap viene a sua volta renderizzata sulla form. In questo modo:</p>
<div>
<div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">   1:</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">void</span> Form1_Paint(<span style="color: #0000ff">object</span> sender, PaintEventArgs e)</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">   2:</span> {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">   3:</span>     <span style="color: #008000">// Creo una bitmap in memoria.</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">   4:</span>     Bitmap buffer = <span style="color: #0000ff">new</span> Bitmap(<span style="color: #0000ff">this</span>.Width, <span style="color: #0000ff">this</span>.Height);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">   5:</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">   6:</span>     <span style="color: #008000">// Utilizzo l'oggetto Graphics della bitmap</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">   7:</span>     <span style="color: #008000">// e disegno tutti i miei oggetti.</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">   8:</span>     <span style="color: #0000ff">using</span> (Graphics graphics = Graphics.FromImage(buffer))</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">   9:</span>     {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">  10:</span>         <span style="color: #008000">// disegno tutti i miei oggetti.</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">  11:</span>     }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">  12:</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">  13:</span>     <span style="color: #008000">// Pulisco la superficie della form e disegno</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">  14:</span>     <span style="color: #008000">// l'immagine che ho in memoria.</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">  15:</span>     e.Graphics.Clear(<span style="color: #0000ff">this</span>.BackColor);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">  16:</span>     e.Graphics.DrawImage(buffer, 0, 0, buffer.Width, buffer.Height);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #606060">  17:</span> }</pre>
</div>
</div>
<p>Le prestazioni sono garantite. <img src='http://www.bloginformatico.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloginformatico.net/2009/03/12/diminuire-leffetto-flickering-aumentando-le-prestazioni-in-gdi/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)

Served from: www.bloginformatico.net @ 2012-02-05 11:38:19 -->
