<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-11303117</id><updated>2011-12-01T01:20:12.935+02:00</updated><title type='text'>C# articles (Mike Chaliy)</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://csharparticles.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://csharparticles.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Mike Chaliy</name><uri>http://www.blogger.com/profile/09666351498842887203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-11303117.post-3338959402144977001</id><published>2009-09-18T00:16:00.003+03:00</published><updated>2009-09-18T00:24:56.732+03:00</updated><title type='text'>Next try to start blogging</title><content type='html'>Well, years are flown and I decided to start English blog again. So please welcome my new blog - &lt;a href="http://chaliy.name/blog/"&gt;http://chaliy.name/blog/&lt;/a&gt;. 

Most of my articles are about .NET, DDD (Domain Driven Development), about integration with technology stacks ranging from java to ruby. I hope to write interesting things about my experience in the enterprise development. About Security, about Patterns, about Practices. About Entity Framework, Linq 2 SQL and NHibernate. About MVC Framework and Windsor Castle. About WCF, ADO.NET and RIA Data Services.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11303117-3338959402144977001?l=csharparticles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://chaliy.name/blog/' title='Next try to start blogging'/><link rel='replies' type='application/atom+xml' href='http://csharparticles.blogspot.com/feeds/3338959402144977001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11303117&amp;postID=3338959402144977001' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/3338959402144977001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/3338959402144977001'/><link rel='alternate' type='text/html' href='http://csharparticles.blogspot.com/2009/09/next-try-to-start-blogging.html' title='Next try to start blogging'/><author><name>Mike Chaliy</name><uri>http://www.blogger.com/profile/09666351498842887203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11303117.post-116491491456415579</id><published>2006-11-30T21:24:00.000+02:00</published><updated>2007-04-15T02:20:55.546+03:00</updated><title type='text'>Ukrainian Developer Community</title><content type='html'>&lt;p&gt;
The purpose of this Community is provide a place to meet for Ukrainian Windows developers, get help and help others, share knowledge and ideas. Our experts will answer all your quesitons on today and tomorrow Microsoft technilogies.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11303117-116491491456415579?l=csharparticles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://dev.net.ua/' title='Ukrainian Developer Community'/><link rel='replies' type='application/atom+xml' href='http://csharparticles.blogspot.com/feeds/116491491456415579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11303117&amp;postID=116491491456415579' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/116491491456415579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/116491491456415579'/><link rel='alternate' type='text/html' href='http://csharparticles.blogspot.com/2006/11/ukrainian-developer-community.html' title='Ukrainian Developer Community'/><author><name>Mike Chaliy</name><uri>http://www.blogger.com/profile/09666351498842887203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11303117.post-114858324659003744</id><published>2006-05-25T21:33:00.000+03:00</published><updated>2007-02-24T12:30:00.596+02:00</updated><title type='text'>Asp.Net 2.0 Flash Control</title><content type='html'>&lt;p&gt;
One of my sites needed Flash. Okay, I was tried to use standard markup. However I need XHTML compliant pages and that markup not for me. XHTML does not allow "embed" tag! To avoid next problems with other sites I was develop control that just renders proper XHTML markup.
&lt;/p&gt;
&lt;p&gt;
Next was well-known issue with loading of the ActiveX controls by IE. My control addresses this issue too. However this is experimental so it is turned off by default.
&lt;/p&gt;
&lt;p&gt;
Of course, as always full design time support.
&lt;/p&gt;
&lt;p&gt;
Download and try &lt;a href="http://www.chaliy.com/Sources/FlashControl/Default.aspx"&gt;Asp.Net 2.0 Flash Control&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Possible that somebody will like control however he will need standard (capable) rendering. Just let me to know. I will add this.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11303117-114858324659003744?l=csharparticles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.chaliy.com/Sources/FlashControl/Default.aspx' title='Asp.Net 2.0 Flash Control'/><link rel='replies' type='application/atom+xml' href='http://csharparticles.blogspot.com/feeds/114858324659003744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11303117&amp;postID=114858324659003744' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114858324659003744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114858324659003744'/><link rel='alternate' type='text/html' href='http://csharparticles.blogspot.com/2006/05/aspnet-20-flash-control.html' title='Asp.Net 2.0 Flash Control'/><author><name>Mike Chaliy</name><uri>http://www.blogger.com/profile/09666351498842887203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11303117.post-114773070874522791</id><published>2006-05-16T01:00:00.000+03:00</published><updated>2006-05-16T01:05:08.746+03:00</updated><title type='text'>PowerShell Tasks for MsBuild</title><content type='html'>&lt;p&gt;
Build eneginering MSBuild have many benefits. One of them is great extesibilty with custom tasks. In other case &lt;a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx"&gt;Windows PowerShell&lt;/a&gt; is very powerfull tool to do automated work. I was develop library that brings power of the &lt;a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx"&gt;Windows PowerShell&lt;/a&gt; to the MSBuild. Please review this at the &lt;a href="http://www.chaliy.com/Sources/PowerShellTasks/Default.aspx"&gt;Home page of the PowerShell Tasks for MsBuild&lt;/a&gt;.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11303117-114773070874522791?l=csharparticles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.chaliy.com/Sources/PowerShellTasks/Default.aspx' title='PowerShell Tasks for MsBuild'/><link rel='replies' type='application/atom+xml' href='http://csharparticles.blogspot.com/feeds/114773070874522791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11303117&amp;postID=114773070874522791' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114773070874522791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114773070874522791'/><link rel='alternate' type='text/html' href='http://csharparticles.blogspot.com/2006/05/powershell-tasks-for-msbuild.html' title='PowerShell Tasks for MsBuild'/><author><name>Mike Chaliy</name><uri>http://www.blogger.com/profile/09666351498842887203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11303117.post-114773037345403342</id><published>2006-05-16T00:43:00.000+03:00</published><updated>2006-05-16T01:00:36.693+03:00</updated><title type='text'>Extending SiteMap Xml file</title><content type='html'>&lt;p&gt;
Sometimes you need to store information on per page basis. For example you need keywords or publish date. I think good choice for this can became Web.SiteMap.
&lt;/p&gt;
&lt;p&gt;
To implement this just add namespace to the root of the XML file. Something like:
&lt;span class="text-code" &gt;
&amp;lt;sitemap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" &lt;strong&gt;xmlns:exs="SiteMap-Extend"&lt;/strong&gt; &gt;
&lt;/span&gt;
Now you can easely add your attributes without any validation warnings. For example:&lt;br /&gt;
&lt;span class="text-code" &gt;
&amp;lt;sitemapnode url="~/Default.aspx" title="Home" description="" &lt;strong&gt;exs:keywords="test, something, oops"&lt;/strong&gt; &gt;
&lt;/span&gt;
From this time this attributes accesible from the code like:
&lt;span class="text-code" &gt;
SiteMap.CurrentNode["exs:keywords"]
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
Enjoy!
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11303117-114773037345403342?l=csharparticles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharparticles.blogspot.com/feeds/114773037345403342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11303117&amp;postID=114773037345403342' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114773037345403342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114773037345403342'/><link rel='alternate' type='text/html' href='http://csharparticles.blogspot.com/2006/05/extending-sitemap-xml-file.html' title='Extending SiteMap Xml file'/><author><name>Mike Chaliy</name><uri>http://www.blogger.com/profile/09666351498842887203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11303117.post-114652092739502487</id><published>2006-05-02T01:01:00.000+03:00</published><updated>2007-01-27T09:15:27.626+02:00</updated><title type='text'>.Net 2.0 Updatable Xml DataSource Control</title><content type='html'>&lt;p&gt;
Month ago I was publish &lt;a href="http://csharparticles.blogspot.com/2006/04/aspnet-20-xml-back-end.html"&gt;post&lt;/a&gt; about XML back-end for the site. I was about problem of this back-end it is read-only. Now I post &lt;a href="http://www.chaliy.com/Sources/UpdatableXmlDataSource/Default.aspx"&gt;.Net 2.0 Updatable Xml DataSource Control&lt;/a&gt; - this seems to be solution for this problem. This is editable replacment for the &lt;a href="msdn2.microsoft.com/en-us/library/ system.web.ui.webcontrols.xmldatasource.aspx "&gt;XmlDataSource&lt;/a&gt;. In real live this is not full replacement because it support only tabular data, but in most cases this is true.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11303117-114652092739502487?l=csharparticles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.chaliy.com/Sources/UpdatableXmlDataSource/Default.aspx' title='.Net 2.0 Updatable Xml DataSource Control'/><link rel='replies' type='application/atom+xml' href='http://csharparticles.blogspot.com/feeds/114652092739502487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11303117&amp;postID=114652092739502487' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114652092739502487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114652092739502487'/><link rel='alternate' type='text/html' href='http://csharparticles.blogspot.com/2006/05/net-20-updatable-xml-datasource.html' title='.Net 2.0 Updatable Xml DataSource Control'/><author><name>Mike Chaliy</name><uri>http://www.blogger.com/profile/09666351498842887203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11303117.post-114615975304517191</id><published>2006-04-27T20:40:00.000+03:00</published><updated>2006-12-29T18:59:03.990+02:00</updated><title type='text'>Integration of the blog with my site.</title><content type='html'>&lt;p&gt;Heh, easy ;) and clean results. Now if you will not look at the address bar you will not even see differences.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11303117-114615975304517191?l=csharparticles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharparticles.blogspot.com/feeds/114615975304517191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11303117&amp;postID=114615975304517191' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114615975304517191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114615975304517191'/><link rel='alternate' type='text/html' href='http://csharparticles.blogspot.com/2006/04/integration-of-blog-with-my-site.html' title='Integration of the blog with my site.'/><author><name>Mike Chaliy</name><uri>http://www.blogger.com/profile/09666351498842887203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11303117.post-114466604475737066</id><published>2006-04-10T13:30:00.000+03:00</published><updated>2007-03-24T15:09:58.320+02:00</updated><title type='text'>Asp.Net 2.0 refresh-less wizard</title><content type='html'>&lt;p&gt;
In Asp.Net 2.0 Microsoft was release &lt;a href="http://msdn2.microsoft.com/en-US/library/system.web.ui.webcontrols.wizard(VS.80).aspx"&gt;Wizard Web Server Control&lt;/a&gt;, also you can find &lt;a href="http://msdn2.microsoft.com/en-us/library/fs0za4w6(VS.80).aspx"&gt;Wizard Web Server Control Overview&lt;/a&gt;. However if you will try this you will see that for every page it need postback. Even for quick connections this will cause flickering and so on. Good news that we have clear solution for this...
&lt;/p&gt;
&lt;p&gt;
We will use another Microsoft’s product called &lt;a href="http://atlas.asp.net/"&gt;Atlas&lt;/a&gt;, this is cool AJAX framework. We will use &lt;a href="http://atlas.asp.net/docs/atlas/doc/controls/default.aspx#updatepanel"&gt;UpdatePanel&lt;/a&gt;. You may simply wrap wizard control with update panel. This is mostly all ;)). 
&lt;/p&gt;
&lt;p&gt;
To avoid misunderstandings you may be familiar with all this stuff. For example if you will click finish button and change something on the page, this will not show on client. I mean that update panel can only change something that is inner it. However in most cases this is not a problem. For example when clicking on the Finish button in my application code will save something in database and then redirect to another page.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11303117-114466604475737066?l=csharparticles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharparticles.blogspot.com/feeds/114466604475737066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11303117&amp;postID=114466604475737066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114466604475737066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114466604475737066'/><link rel='alternate' type='text/html' href='http://csharparticles.blogspot.com/2006/04/aspnet-20-refresh-less-wizard.html' title='Asp.Net 2.0 refresh-less wizard'/><author><name>Mike Chaliy</name><uri>http://www.blogger.com/profile/09666351498842887203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11303117.post-114460916115645671</id><published>2006-04-09T21:49:00.000+03:00</published><updated>2006-10-31T18:55:23.506+02:00</updated><title type='text'>Great news for applications that can use Source Safe, now thay can do this with Visual Studio 2005 Team Foundation Server.</title><content type='html'>&lt;p&gt;
Microsoft was published &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=87E1FFBD-A484-4C3A-8776-D560AB1E6198&amp;displaylang=en"&gt;Visual Studio 2005 Team Foundation Server MSSCCI Provider&lt;/a&gt;, tool that give ability to connect your Dreamweaver or another application that support SourceSafe aka MSSCCI to the Visual Studio 2005 Team Foundation Server. Now I am downloading Trial Team Foundation Server Software so in few days I will write results of my experiments.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11303117-114460916115645671?l=csharparticles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharparticles.blogspot.com/feeds/114460916115645671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11303117&amp;postID=114460916115645671' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114460916115645671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114460916115645671'/><link rel='alternate' type='text/html' href='http://csharparticles.blogspot.com/2006/04/great-news-for-applications-that-can.html' title='Great news for applications that can use Source Safe, now thay can do this with Visual Studio 2005 Team Foundation Server.'/><author><name>Mike Chaliy</name><uri>http://www.blogger.com/profile/09666351498842887203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11303117.post-114424047223623704</id><published>2006-04-05T15:17:00.000+03:00</published><updated>2007-01-26T05:37:00.436+02:00</updated><title type='text'>DSL tools. New paradigm of the programming?</title><content type='html'>&lt;p&gt;
Firstly short intro. &lt;strong&gt;&lt;a href="http://msdn.microsoft.com/vstudio/DSLTools/"&gt;DSL&lt;/a&gt;&lt;/strong&gt; tools provide functionality to build languages that can completely replace &lt;strong&gt;UML&lt;/strong&gt; languages. But &lt;strong&gt;&lt;a href="http://msdn.microsoft.com/vstudio/DSLTools/"&gt;DSL&lt;/a&gt;&lt;/strong&gt; can do many more. One of the keyed features is &lt;strong&gt;Code Generation&lt;/strong&gt;. Theoretically this is great idea.
&lt;/p&gt;
&lt;p&gt;
For example in the &lt;strong&gt;&lt;a href="http://msdn.microsoft.com/vstudio/DSLTools/"&gt;DSL&lt;/a&gt;&lt;/strong&gt; tools you can find sample of the Wizard DSL Language. With this language you can draw diagram of the wizard pages and then generate many code. Okay templating and code generation is great. But what we have. With standard development process we use base class that has most functionality and then we derive custom classes and add functionality we need. Possible that someone will think that this is easier to add code from the base class to the template and then generate all. Hope you are not from this "someone". This is wrong way. And you may understand that in most cases you will not be able to regenerate all code. So if in your code will be issue you will not be able to fix this in one place.
&lt;/p&gt;
&lt;p&gt;
Other thing that I think that this is great way to automate database developing. Somebody may create language for the database. Possible that Microsoft will do this or someone else. However I will try this in nearest future.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11303117-114424047223623704?l=csharparticles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharparticles.blogspot.com/feeds/114424047223623704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11303117&amp;postID=114424047223623704' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114424047223623704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114424047223623704'/><link rel='alternate' type='text/html' href='http://csharparticles.blogspot.com/2006/04/dsl-tools-new-paradigm-of-programming.html' title='DSL tools. New paradigm of the programming?'/><author><name>Mike Chaliy</name><uri>http://www.blogger.com/profile/09666351498842887203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11303117.post-114419148081375992</id><published>2006-04-05T01:50:00.000+03:00</published><updated>2007-03-02T12:46:42.716+02:00</updated><title type='text'>Microsoft Office 2007 Look</title><content type='html'>&lt;p&gt;
Some minutes ago I was finish installation of the Microsoft Office 2007 ("Office 2007"). This is great. Of course I am not thinking that this is revolution version, it have too many things from old versions. However Ribbon Toolbars and how they use title space - this is great-great ideas.
&lt;/p&gt;
&lt;p&gt;
Okay, all is great. However as always something wrong. Now this wrong is that Office 2007 has too many interfaces. Word, Excel, PowerPoint have new Ribbon toolbars, Outlook have new colored but still old toolbars, and other application have old toolbars at all. Of course possible that this is only because it is beta. Hope Microsoft will have new interface in all their applications.
&lt;/p&gt;
&lt;p&gt;
P.S. Tomorrow I will try to install proofing tools from Office 2003 and post result here.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11303117-114419148081375992?l=csharparticles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharparticles.blogspot.com/feeds/114419148081375992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11303117&amp;postID=114419148081375992' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114419148081375992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114419148081375992'/><link rel='alternate' type='text/html' href='http://csharparticles.blogspot.com/2006/04/microsoft-office-2007-look.html' title='Microsoft Office 2007 Look'/><author><name>Mike Chaliy</name><uri>http://www.blogger.com/profile/09666351498842887203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11303117.post-114392663117725932</id><published>2006-04-01T23:48:00.000+03:00</published><updated>2006-06-15T04:28:10.940+03:00</updated><title type='text'>Asp.Net 2.0 XML back-end</title><content type='html'>&lt;p&gt;
In most cases developers use databases for the site back-end. However for small sites or sites where most content is not needed database you can use XML.
&lt;/p&gt;
&lt;p&gt;
In Asp.Net 2.0 you can use &lt;a href="http://msdn2.microsoft.com/en-us/library/e8d8587a(en-US,VS.80).aspx"&gt;XmlDataSource&lt;/a&gt; with many databound controls like &lt;a href=” http://msdn2.microsoft.com/en-us/library/ka8cb0xz.aspx“&gt;FormView&lt;/a&gt;  or &lt;a href=” http://msdn2.microsoft.com/en-us/library/4w7ya1ts.aspx”&gt;&lt;/a&gt;. This provides easy way to show various data.
&lt;/p&gt;
&lt;p&gt;
For example I can describe one of the strategies what I use. This is the &lt;a href="http://www.chaliy.com/Sources/Default.aspx"&gt;Sources&lt;/a&gt; folder of my site. On the start page it have list of all sources. They have title, description, screen url, details url and download url. For details page I need the same list of the data plus long description (article). This means that many of the identical data stored in the different places of the site. Of course I want to have one place for this information. How I was resolving this? I was added sources.xml file in the App_Data directory that has all this data. Now for the start page I use &lt;a href=”http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.datalist.aspx“&gt;DataList&lt;/a&gt; binded to the &lt;a href="http://msdn2.microsoft.com/en-us/library/e8d8587a(en-US,VS.80).aspx"&gt;XmlDataSource&lt;/a&gt;  that retrieve information from the sources.xml. For details page I use &lt;a href=” http://msdn2.microsoft.com/en-us/library/ka8cb0xz.aspx“&gt;FormView&lt;/a&gt; with &lt;a href="http://msdn2.microsoft.com/en-us/library/e8d8587a(en-US,VS.80).aspx"&gt;XmlDataSource&lt;/a&gt;  that retrieve information from the same xml file, however I use XPath that filters this file to show only appropriate information. Clear?
&lt;/p&gt;
&lt;p&gt;
I think this technology is useful for many places. However it has big issue... &lt;a href="http://msdn2.microsoft.com/en-us/library/e8d8587a(en-US,VS.80).aspx"&gt;XmlDataSource&lt;/a&gt;  is read-only.
&lt;/p&gt;
&lt;p&gt;
P.S. Possible that in few days I will post UpdatableXmlDataSource. But of course I can not promise something.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11303117-114392663117725932?l=csharparticles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharparticles.blogspot.com/feeds/114392663117725932/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11303117&amp;postID=114392663117725932' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114392663117725932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114392663117725932'/><link rel='alternate' type='text/html' href='http://csharparticles.blogspot.com/2006/04/aspnet-20-xml-back-end.html' title='Asp.Net 2.0 XML back-end'/><author><name>Mike Chaliy</name><uri>http://www.blogger.com/profile/09666351498842887203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11303117.post-114392371432188851</id><published>2006-04-01T23:31:00.000+03:00</published><updated>2006-04-27T20:26:12.876+03:00</updated><title type='text'>Asp.Net Meta Control - Easy way to control your meta data.</title><content type='html'>&lt;p&gt;
Something like in response to the previous &lt;a href="http://csharparticles.blogspot.com/2006/04/meta-tags-in-aspnet.html"&gt;post &lt;/a&gt; I was develop &lt;a href="http://www.chaliy.com/Sources/MetaControl/Default.aspx"&gt;Asp.Net Meta Control&lt;/a&gt;. This control provides easy, high-level access to the edit HTML Meta Tag information. It has full design time support in face of the editors for different meta tag types.
&lt;/p&gt;
&lt;p&gt;
Be sure it has full support of the databinding :).
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11303117-114392371432188851?l=csharparticles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.chaliy.com/Sources/MetaControl/Default.aspx' title='Asp.Net Meta Control - Easy way to control your meta data.'/><link rel='replies' type='application/atom+xml' href='http://csharparticles.blogspot.com/feeds/114392371432188851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11303117&amp;postID=114392371432188851' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114392371432188851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114392371432188851'/><link rel='alternate' type='text/html' href='http://csharparticles.blogspot.com/2006/04/aspnet-meta-control-easy-way-to.html' title='Asp.Net Meta Control - Easy way to control your meta data.'/><author><name>Mike Chaliy</name><uri>http://www.blogger.com/profile/09666351498842887203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11303117.post-114392347172438022</id><published>2006-04-01T23:23:00.000+03:00</published><updated>2007-04-06T15:40:29.710+03:00</updated><title type='text'>Meta tags in the asp.net</title><content type='html'>&lt;p&gt;
Meta tags in the asp.net is rendered by &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.htmlcontrols.htmlmeta(VS.80).aspx"&gt;HtmlMeta&lt;/a&gt; control.  Just in the OnPageLoad add this control to the Header.Controls collection.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11303117-114392347172438022?l=csharparticles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharparticles.blogspot.com/feeds/114392347172438022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11303117&amp;postID=114392347172438022' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114392347172438022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114392347172438022'/><link rel='alternate' type='text/html' href='http://csharparticles.blogspot.com/2006/04/meta-tags-in-aspnet.html' title='Meta tags in the asp.net'/><author><name>Mike Chaliy</name><uri>http://www.blogger.com/profile/09666351498842887203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11303117.post-114392288547665035</id><published>2006-04-01T23:07:00.000+03:00</published><updated>2006-04-27T20:27:16.150+03:00</updated><title type='text'>IE7 and standards</title><content type='html'>&lt;p&gt;
As you know Internet Explorer 7("IE7") is new version of the Microsoft's browser. One of the keyed features of it is support of the standards. Okay this is great, however it still does not have even full CSS2 support (I am not say about CSS3 at all). What this mean for developers? Yes you are right. This means that in the list of the browsers like Gecko, Opera and IE we need to add... IE7! Now IE7 does not properly renders sites that was designed for IE6 and it still does not properly renders standard compliance sites. Great!
&lt;/p&gt;
&lt;p&gt;
But let take view in the nearest future. What Microsoft can add in the IE8? Of course more security, but we do not talk about security; they adding it in the every version. Other features are already here (I mean tabs, png, rss). I think they will add more standard compliance. And what we will have? Yes! We will have to add additional browser in our developer list. 
&lt;/p&gt;
&lt;p&gt;
Hope at least IE8 will have standard compliance rendering.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11303117-114392288547665035?l=csharparticles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharparticles.blogspot.com/feeds/114392288547665035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11303117&amp;postID=114392288547665035' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114392288547665035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114392288547665035'/><link rel='alternate' type='text/html' href='http://csharparticles.blogspot.com/2006/04/ie7-and-standards.html' title='IE7 and standards'/><author><name>Mike Chaliy</name><uri>http://www.blogger.com/profile/09666351498842887203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11303117.post-114044110024438630</id><published>2006-02-20T15:07:00.000+02:00</published><updated>2006-04-27T20:27:34.906+03:00</updated><title type='text'>.Net 2.0 ToolStrip Rebar Renderer</title><content type='html'>&lt;p&gt;
Sometimes “Internet Explorer Rebar”’s look is more professional instead of “Microsoft Office Toolbar”’s one. For this reason I was develop RebarRenderer - .Net Rebar style ToolStrip Rendrer.
&lt;/p&gt;
&lt;p&gt;
Some features:
&lt;ul&gt;
&lt;li&gt;
Renders ToolsStrip and MenuStrip with Microsoft Internet Explorer Rebar style. 
&lt;/li&gt;
&lt;li&gt;
Full support of themes (including third-party themes and software like StyleXP). 
&lt;/li&gt;
&lt;li&gt;
Clear rendering with disabled themes.
&lt;/li&gt;
&lt;li&gt;
Support of both Rtl and Ltr directions.
&lt;/li&gt;
&lt;li&gt;
Sources included.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;p&gt;
For more detailed description and sources on &lt;a href="http://www.chaliy.com/Sources/RebarRenderer/"&gt;.Net 2.0 ToolStrip Rebar Renderer Home Page&lt;/a&gt;.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11303117-114044110024438630?l=csharparticles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.chaliy.com/Sources/RebarRenderer/' title='.Net 2.0 ToolStrip Rebar Renderer'/><link rel='replies' type='application/atom+xml' href='http://csharparticles.blogspot.com/feeds/114044110024438630/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11303117&amp;postID=114044110024438630' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114044110024438630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/114044110024438630'/><link rel='alternate' type='text/html' href='http://csharparticles.blogspot.com/2006/02/net-20-toolstrip-rebar-renderer.html' title='.Net 2.0 ToolStrip Rebar Renderer'/><author><name>Mike Chaliy</name><uri>http://www.blogger.com/profile/09666351498842887203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11303117.post-112263596531812458</id><published>2005-07-29T14:10:00.000+03:00</published><updated>2007-03-04T16:34:13.696+02:00</updated><title type='text'>Long and short file name conversion in c#</title><content type='html'>&lt;p&gt;
Hello. Here is very simple code for short to long and long to short file names conversion.
&lt;/p&gt;
&lt;p&gt;
Short to long:
&lt;span class="text-code"&gt;
&lt;pre&gt;&lt;span style="color: #0000FF; "&gt;using&lt;/span&gt;&lt;span style="color: #000000; "&gt; System;
&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;using&lt;/span&gt;&lt;span style="color: #000000; "&gt; System.Runtime.InteropServices;
&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;using&lt;/span&gt;&lt;span style="color: #000000; "&gt; System.Text;

&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;public&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;class&lt;/span&gt;&lt;span style="color: #000000; "&gt; _Main
{
    [DllImport(&lt;/span&gt;&lt;span style="color: #000000; "&gt;"&lt;/span&gt;&lt;span style="color: #008080; "&gt;kernel32.dll&lt;/span&gt;&lt;span style="color: #000000; "&gt;"&lt;/span&gt;&lt;span style="color: #000000; "&gt;, CharSet &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; CharSet.Auto)]
    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;public&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;static&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;extern&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;int&lt;/span&gt;&lt;span style="color: #000000; "&gt; GetLongPathName(
        [MarshalAs(UnmanagedType.LPTStr)]
        &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;string&lt;/span&gt;&lt;span style="color: #000000; "&gt; path,
        [MarshalAs(UnmanagedType.LPTStr)]
        StringBuilder longPath,
        &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;int&lt;/span&gt;&lt;span style="color: #000000; "&gt; longPathLength
        );
        
    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;public&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;static&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;void&lt;/span&gt;&lt;span style="color: #000000; "&gt; Main()
    {
        StringBuilder longPath &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;new&lt;/span&gt;&lt;span style="color: #000000; "&gt; StringBuilder(&lt;/span&gt;&lt;span style="color: #FF0000; "&gt;255&lt;/span&gt;&lt;span style="color: #000000; "&gt;);
        GetLongPathName(&lt;/span&gt;&lt;span style="color: #000000; "&gt;@"&lt;/span&gt;&lt;span style="color: #008080; "&gt;D:\MYTEMP~1\RESOUR~1\sql.txt&lt;/span&gt;&lt;span style="color: #000000; "&gt;"&lt;/span&gt;&lt;span style="color: #000000; "&gt;, longPath, longPath.Capacity);
        Console.WriteLine(longPath.ToString());
    }
}&lt;/span&gt;&lt;/pre&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
Long to short:

&lt;span class="text-code"&gt;
&lt;pre&gt;&lt;span style="color: #0000FF; "&gt;using&lt;/span&gt;&lt;span style="color: #000000; "&gt; System;
&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;using&lt;/span&gt;&lt;span style="color: #000000; "&gt; System.Runtime.InteropServices;
&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;using&lt;/span&gt;&lt;span style="color: #000000; "&gt; System.Text;

&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;public&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;class&lt;/span&gt;&lt;span style="color: #000000; "&gt; _Main
{
    [DllImport(&lt;/span&gt;&lt;span style="color: #000000; "&gt;"&lt;/span&gt;&lt;span style="color: #008080; "&gt;kernel32.dll&lt;/span&gt;&lt;span style="color: #000000; "&gt;"&lt;/span&gt;&lt;span style="color: #000000; "&gt;, CharSet &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; CharSet.Auto)]
    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;public&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;static&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;extern&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;int&lt;/span&gt;&lt;span style="color: #000000; "&gt; GetShortPathName(
        [MarshalAs(UnmanagedType.LPTStr)]
        &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;string&lt;/span&gt;&lt;span style="color: #000000; "&gt; path,
        [MarshalAs(UnmanagedType.LPTStr)]
        StringBuilder shortPath,
        &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;int&lt;/span&gt;&lt;span style="color: #000000; "&gt; shortPathLength
        );
        
    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;public&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;static&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;void&lt;/span&gt;&lt;span style="color: #000000; "&gt; Main()
    {
        StringBuilder shortPath &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;new&lt;/span&gt;&lt;span style="color: #000000; "&gt; StringBuilder(&lt;/span&gt;&lt;span style="color: #FF0000; "&gt;255&lt;/span&gt;&lt;span style="color: #000000; "&gt;);
            GetShortPathName(&lt;/span&gt;&lt;span style="color: #000000; "&gt;@"&lt;/span&gt;&lt;span style="color: #008080; "&gt;D:\My Temp\ResourseProvider\sql.txt&lt;/span&gt;&lt;span style="color: #000000; "&gt;"&lt;/span&gt;&lt;span style="color: #000000; "&gt;, shortPath, shortPath.Capacity);
            Console.WriteLine(shortPath.ToString());
    }
}&lt;/span&gt;&lt;/pre&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
Please note that file must exists on the disk. This occur because file system need to know if other files. Two long names produce same names in short form and if so file system will add unique indexes to them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11303117-112263596531812458?l=csharparticles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharparticles.blogspot.com/feeds/112263596531812458/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11303117&amp;postID=112263596531812458' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/112263596531812458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/112263596531812458'/><link rel='alternate' type='text/html' href='http://csharparticles.blogspot.com/2005/07/long-and-short-file-name-conversion-in.html' title='Long and short file name conversion in c#'/><author><name>Mike Chaliy</name><uri>http://www.blogger.com/profile/09666351498842887203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11303117.post-111193988326341810</id><published>2005-03-27T18:59:00.000+03:00</published><updated>2006-04-27T20:30:56.566+03:00</updated><title type='text'>Hierarchical TreeView control with data binding enabled</title><content type='html'>&lt;p&gt;
Some time ago my task was to write something like virtual file system. Of course I decide to use typed &lt;b&gt;DataSets&lt;/b&gt; because I am already wrote framework to work and update them easily. With this technology there are very easy to display content of the folder. Relation &lt;b&gt;DataTables&lt;/b&gt; are very great tool for this. That’s all right but when I have seen the result - I had died! This is not look and feel that I mentioned for my client! So I am open google and start searching for TreeView with data binding enabled. Of course I found something: &lt;a href="http://www.codeproject.com/cs/miscctrl/dbTree.asp"&gt;this (Data Binding TreeView in C#)&lt;/a&gt; is pretty but this is not hierarchy in my understanding; &lt;a href="http://www.codeproject.com/cs/miscctrl/treeviewtutorial.asp"&gt;this (How to fill hierarchical data into a TreeView using base classes and data providers)&lt;/a&gt; is pretty too but I am not understood why author do not like standard binding. Both are not for me! And as real Ukrainian man I decide try to write my own!
&lt;/p&gt;
&lt;p&gt;
See article on &lt;a href="http://www.codeproject.com/cs/miscctrl/bindablehierarchicaltree.asp"&gt;"Code Project"&lt;/a&gt;.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11303117-111193988326341810?l=csharparticles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharparticles.blogspot.com/feeds/111193988326341810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11303117&amp;postID=111193988326341810' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/111193988326341810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/111193988326341810'/><link rel='alternate' type='text/html' href='http://csharparticles.blogspot.com/2005/03/hierarchical-treeview-control-with.html' title='Hierarchical TreeView control with data binding enabled'/><author><name>Mike Chaliy</name><uri>http://www.blogger.com/profile/09666351498842887203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11303117.post-111090951539769083</id><published>2005-03-15T19:12:00.000+02:00</published><updated>2007-04-02T23:40:05.980+03:00</updated><title type='text'>Custom drawing cursors</title><content type='html'>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Some time ago I have decided to try to make something like a "Photoshop" in C#. The first problem has appeared was custom cursors. If you are familiar with "Photoshop" you know that when you change brush size the cursor size also changes. This is solution to make this possible in C# . Note: hare will described only black and white cursors. It is possible that I will upgrade this article or create new for 32-bit cursors. &lt;/p&gt;
&lt;p&gt;Standard realization of class Cursor practically completely repeats Win API for the cursor except for method &lt;strong&gt;CreateCursor &lt;/strong&gt;. This method is necessary for drawing custom cursor. So we import it from library user32.dll.&lt;/p&gt;

&lt;span class="text-code"&gt;&lt;pre&gt;&lt;span style="color:#000000;"&gt;[&lt;/span&gt;&lt;span style="color:#000000;"&gt;DllImport&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#800080;"&gt;"user32.dll"&lt;/span&gt;&lt;span style="color:#000000;"&gt;)&lt;/span&gt;&lt;span style="color:#000000;"&gt;]&lt;/span&gt;
&lt;span style="color:#0000ff;"&gt;private&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;static&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;extern&lt;/span&gt;&lt;span style="color:#000000;"&gt; IntPtr CreateCursor&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;
&lt;span style="color:#000000;"&gt;    IntPtr hInst&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;
&lt;span style="color:#000000;"&gt;    &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;&lt;span style="color:#000000;"&gt; xHotSpot&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;
&lt;span style="color:#000000;"&gt;    &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;&lt;span style="color:#000000;"&gt; yHotSpot&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;
&lt;span style="color:#000000;"&gt;    &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;&lt;span style="color:#000000;"&gt; nWidth&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;
&lt;span style="color:#000000;"&gt;    &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;&lt;span style="color:#000000;"&gt; nHeight&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;
&lt;span style="color:#000000;"&gt;    &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;byte&lt;/span&gt;&lt;span style="color:#000000;"&gt;[&lt;/span&gt;&lt;span style="color:#000000;"&gt;]&lt;/span&gt;&lt;span style="color:#000000;"&gt; pvANDPlane&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;
&lt;span style="color:#000000;"&gt;    &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;byte&lt;/span&gt;&lt;span style="color:#000000;"&gt;[&lt;/span&gt;&lt;span style="color:#000000;"&gt;]&lt;/span&gt;&lt;span style="color:#000000;"&gt; pvXORPlane&lt;/span&gt;
&lt;span style="color:#000000;"&gt;    &lt;/span&gt;&lt;span style="color:#000000;"&gt;)&lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;
&lt;p&gt;The method needs handle to the current window, coordinates of the cursor's hot spot, the size and mask of the image. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The sizes of the cursor &lt;/strong&gt;: &lt;/p&gt;
&lt;p&gt;Win API contains method &lt;strong&gt;GetSystemMetrics &lt;/strong&gt;which returns the possible size of cursor, but it always return 32/32 for standard video devices or 64/64 for hi-resolution devices. In the experimental way I have find out that the sizes of the cursor should be multiple 16 px. So we will not use &lt;strong&gt;GetSystemMetrics &lt;/strong&gt;. Attempt of use of the non-standard size leads to wrong display of the image. As greater accuracy is necessary for us than 16 px we shall take the size of the cursor with a stock. All that remains will be in visible so this is for us! &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Masks of the cursor: &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The image of the cursor is set by means of two masks (AND and XOR masks). Masks consist from array of byte where every b i t designates one pixel. Here results of a combination of two pixels:&lt;/p&gt;
&lt;span style="color:#000000;"&gt;
&lt;table border="0" bgcolor="#FFFAED" width="100%" cellpadding="10" cellspacing="0" style="border-top:1px solid #CCB67E; border-bottom:1px solid #FFFEFA; border-right:1px solid #FFFEFA; border-left:1px solid #CCB67E; margin-top:5px"&gt;&lt;tr&gt;&lt;td&gt;
&lt;td valign="center" align="middle" width="115"&gt;AND mask&lt;/td&gt;
&lt;td valign="center" align="middle" width="132"&gt;XOR mask&lt;/td&gt;
&lt;td valign="center" width="156"&gt;Result&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="center" align="middle" width="115"&gt;0&lt;/td&gt;
&lt;td valign="center" align="middle" width="132"&gt;0&lt;/td&gt;
&lt;td valign="center" width="156"&gt;Black&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="center" align="middle" width="115"&gt;0&lt;/td&gt;
&lt;td valign="center" align="middle" width="132"&gt;1&lt;/td&gt;
&lt;td valign="center" width="156"&gt;White&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="center" align="middle" width="115"&gt;1&lt;/td&gt;
&lt;td valign="center" align="middle" width="132"&gt;0&lt;/td&gt;
&lt;td valign="center" width="156"&gt;Screen&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="center" align="middle" width="115"&gt;1&lt;/td&gt;
&lt;td valign="center" align="middle" width="132"&gt;1&lt;/td&gt;
&lt;td valign="center" width="156"&gt;Reverse screen&lt;/td&gt;
&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;/span&gt;
&lt;p&gt;&lt;strong&gt;Result code: &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Using &lt;strong&gt;CreateCursor &lt;/strong&gt;function this is simple to create new cursor from masks: &lt;/p&gt;
&lt;span class="text-code"&gt;&lt;pre&gt;&lt;span style="color:#0000ff;"&gt;byte&lt;/span&gt;&lt;span style="color:#000000;"&gt;[&lt;/span&gt;&lt;span style="color:#000000;"&gt;]&lt;/span&gt;&lt;span style="color:#000000;"&gt; andMaskCursor &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;byte&lt;/span&gt;&lt;span style="color:#000000;"&gt;[&lt;/span&gt;&lt;span style="color:#000000;"&gt;]&lt;/span&gt;
&lt;span style="color:#000000;"&gt;{&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;
&lt;span style="color:#000000;"&gt;    0xFF&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0xFC&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0x3F&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0xFF&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt;   &lt;/span&gt;&lt;span style="color:#008000;"&gt;// line 1 &lt;/span&gt;
&lt;span style="color:#000000;"&gt;    0xFF&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0xC0&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0x1F&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0xFF&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt;   &lt;/span&gt;&lt;span style="color:#008000;"&gt;// line 2 &lt;/span&gt;
&lt;span style="color:#000000;"&gt;    0xFF&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0x00&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0x3F&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0xFF&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt;   &lt;/span&gt;&lt;span style="color:#008000;"&gt;// line 3    &lt;/span&gt;&lt;span style="color:#000000;"&gt;         &lt;/span&gt;
&lt;span style="color:#000000;"&gt;    &lt;/span&gt;&lt;span style="color:#000000;"&gt;.&lt;/span&gt;&lt;span style="color:#000000;"&gt;.&lt;/span&gt;&lt;span style="color:#000000;"&gt;.&lt;/span&gt;
&lt;span style="color:#000000;"&gt;    0xFF&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0xC3&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0xFF&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0xFF&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt;   &lt;/span&gt;&lt;span style="color:#008000;"&gt;// line 31 &lt;/span&gt;
&lt;span style="color:#000000;"&gt;    0xFF&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0xFF&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0xFF&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0xFF    &lt;/span&gt;&lt;span style="color:#008000;"&gt;// line 32 &lt;/span&gt;
&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;
&lt;span style="color:#000000;"&gt;&lt;/span&gt;
&lt;span style="color:#0000ff;"&gt;byte&lt;/span&gt;&lt;span style="color:#000000;"&gt;[&lt;/span&gt;&lt;span style="color:#000000;"&gt;]&lt;/span&gt;&lt;span style="color:#000000;"&gt; xorMaskCursor &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;byte&lt;/span&gt;&lt;span style="color:#000000;"&gt;[&lt;/span&gt;&lt;span style="color:#000000;"&gt;]&lt;/span&gt;
&lt;span style="color:#000000;"&gt;{&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;
&lt;span style="color:#000000;"&gt;    0x00&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0x00&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0x00&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0x00&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt;   &lt;/span&gt;&lt;span style="color:#008000;"&gt;// line 1 &lt;/span&gt;
&lt;span style="color:#000000;"&gt;    0x00&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0x03&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0xC0&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0x00&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt;   &lt;/span&gt;&lt;span style="color:#008000;"&gt;// line 2 &lt;/span&gt;
&lt;span style="color:#000000;"&gt;    0x00&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0x3F&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0x00&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0x00&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt;   &lt;/span&gt;&lt;span style="color:#008000;"&gt;// line 3    &lt;/span&gt;&lt;span style="color:#000000;"&gt;         &lt;/span&gt;
&lt;span style="color:#000000;"&gt;    &lt;/span&gt;&lt;span style="color:#000000;"&gt;.&lt;/span&gt;&lt;span style="color:#000000;"&gt;.&lt;/span&gt;&lt;span style="color:#000000;"&gt;.&lt;/span&gt;
&lt;span style="color:#000000;"&gt;    0x00&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0x00&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0x00&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0x00&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt;   &lt;/span&gt;&lt;span style="color:#008000;"&gt;// line 31 &lt;/span&gt;
&lt;span style="color:#000000;"&gt;    0x00&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0x00&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0x00&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0x00    &lt;/span&gt;&lt;span style="color:#008000;"&gt;// line 32 &lt;/span&gt;
&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;
&lt;span style="color:#000000;"&gt;&lt;/span&gt;
&lt;span style="color:#000000;"&gt;IntPtr cursorHandle &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; CreateCursor&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;
&lt;span style="color:#000000;"&gt;    handle&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt;             &lt;/span&gt;&lt;span style="color:#008000;"&gt;// app. instance &lt;/span&gt;
&lt;span style="color:#000000;"&gt;    radius&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt;             &lt;/span&gt;&lt;span style="color:#008000;"&gt;// hot spot horiz pos&lt;/span&gt;
&lt;span style="color:#000000;"&gt;    radius&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt;             &lt;/span&gt;&lt;span style="color:#008000;"&gt;// hot spot vert pos &lt;/span&gt;
&lt;span style="color:#000000;"&gt;    sideLength&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt;         &lt;/span&gt;&lt;span style="color:#008000;"&gt;// cursor width &lt;/span&gt;
&lt;span style="color:#000000;"&gt;    sideLength&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt;         &lt;/span&gt;&lt;span style="color:#008000;"&gt;// cursor height &lt;/span&gt;
&lt;span style="color:#000000;"&gt;    andMaskCursor&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#000000;"&gt;      &lt;/span&gt;&lt;span style="color:#008000;"&gt;// AND mask &lt;/span&gt;
&lt;span style="color:#000000;"&gt;    xorMaskCursor       &lt;/span&gt;&lt;span style="color:#008000;"&gt;// XOR mask &lt;/span&gt;
&lt;span style="color:#000000;"&gt;)&lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;
&lt;span style="color:#000000;"&gt;&lt;/span&gt;
&lt;span style="color:#000000;"&gt;Cursor&lt;/span&gt;&lt;span style="color:#000000;"&gt;.&lt;/span&gt;&lt;span style="color:#000000;"&gt;Current &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; Cursor&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#000000;"&gt;cursorHandle&lt;/span&gt;&lt;span style="color:#000000;"&gt;)&lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;

&lt;p&gt;Huuh.. now we can create cursors programmatically . Masks now are hard coded that is not applicable for us! Lets create mask with circle cursor: &lt;/p&gt;
&lt;span class="text-code"&gt;&lt;pre&gt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;&lt;span style="color:#000000;"&gt; sideLength &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; radius&lt;/span&gt;&lt;span style="color:#000000;"&gt;*&lt;/span&gt;&lt;span style="color:#000000;"&gt;2&lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;span style="color:#000000;"&gt;          &lt;/span&gt;
&lt;span style="color:#0000ff;"&gt;if&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#000000;"&gt;sideLength&lt;/span&gt;&lt;span style="color:#000000;"&gt;%&lt;/span&gt;&lt;span style="color:#000000;"&gt;16 &lt;/span&gt;&lt;span style="color:#000000;"&gt;!&lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; 15&lt;/span&gt;&lt;span style="color:#000000;"&gt;)&lt;/span&gt;
&lt;span style="color:#000000;"&gt;{&lt;/span&gt;
&lt;span style="color:#000000;"&gt;    sideLength &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; sideLength &lt;/span&gt;&lt;span style="color:#000000;"&gt;+&lt;/span&gt;&lt;span style="color:#000000;"&gt; 16&lt;/span&gt;&lt;span style="color:#000000;"&gt;-&lt;/span&gt;&lt;span style="color:#000000;"&gt;sideLength&lt;/span&gt;&lt;span style="color:#000000;"&gt;%&lt;/span&gt;&lt;span style="color:#000000;"&gt;16&lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;
&lt;span style="color:#000000;"&gt;}&lt;/span&gt;
&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;length&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; sideLength&lt;/span&gt;&lt;span style="color:#000000;"&gt;*&lt;/span&gt;&lt;span style="color:#000000;"&gt;sideLength&lt;/span&gt;&lt;span style="color:#000000;"&gt;/&lt;/span&gt;&lt;span style="color:#000000;"&gt;8&lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;
&lt;span style="color:#0000ff;"&gt;byte&lt;/span&gt;&lt;span style="color:#000000;"&gt;[&lt;/span&gt;&lt;span style="color:#000000;"&gt;]&lt;/span&gt;&lt;span style="color:#000000;"&gt; andMaskCursor &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;byte&lt;/span&gt;&lt;span style="color:#000000;"&gt;[&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;length&lt;/span&gt;&lt;span style="color:#000000;"&gt;]&lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;
&lt;span style="color:#0000ff;"&gt;byte&lt;/span&gt;&lt;span style="color:#000000;"&gt;[&lt;/span&gt;&lt;span style="color:#000000;"&gt;]&lt;/span&gt;&lt;span style="color:#000000;"&gt; xorMaskCursor &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;byte&lt;/span&gt;&lt;span style="color:#000000;"&gt;[&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;length&lt;/span&gt;&lt;span style="color:#000000;"&gt;]&lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;
&lt;span style="color:#0000ff;"&gt;for&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;&lt;span style="color:#000000;"&gt; i &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0&lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;span style="color:#000000;"&gt; i &lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;&lt;/span&gt;&lt;span style="color:#000000;"&gt; sideLength&lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;span style="color:#000000;"&gt; i&lt;/span&gt;&lt;span style="color:#000000;"&gt;+&lt;/span&gt;&lt;span style="color:#000000;"&gt;+&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;)&lt;/span&gt;
&lt;span style="color:#000000;"&gt;{&lt;/span&gt;
&lt;span style="color:#000000;"&gt;    &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;for&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;&lt;span style="color:#000000;"&gt; j &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; 0&lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;span style="color:#000000;"&gt; j &lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;&lt;/span&gt;&lt;span style="color:#000000;"&gt; sideLength&lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;span style="color:#000000;"&gt; j&lt;/span&gt;&lt;span style="color:#000000;"&gt;+&lt;/span&gt;&lt;span style="color:#000000;"&gt;+&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;)&lt;/span&gt;
&lt;span style="color:#000000;"&gt;    &lt;/span&gt;&lt;span style="color:#000000;"&gt;{&lt;/span&gt;&lt;span style="color:#000000;"&gt;                   &lt;/span&gt;
&lt;span style="color:#000000;"&gt;        &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;double&lt;/span&gt;&lt;span style="color:#000000;"&gt; x &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; i &lt;/span&gt;&lt;span style="color:#000000;"&gt;-&lt;/span&gt;&lt;span style="color:#000000;"&gt; radius&lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;
&lt;span style="color:#000000;"&gt;        &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;double&lt;/span&gt;&lt;span style="color:#000000;"&gt; y &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; j &lt;/span&gt;&lt;span style="color:#000000;"&gt;-&lt;/span&gt;&lt;span style="color:#000000;"&gt; radius&lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;
&lt;span style="color:#000000;"&gt;        &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;double&lt;/span&gt;&lt;span style="color:#000000;"&gt; pRadius &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; Math&lt;/span&gt;&lt;span style="color:#000000;"&gt;.&lt;/span&gt;&lt;span style="color:#000000;"&gt;Pow&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#000000;"&gt;
            Math.Pow(x, 2) + Math.Pow(y, 2), 0.5
            );
        &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;if&lt;/span&gt;&lt;span style="color:#000000;"&gt; ((&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;&lt;span style="color:#000000;"&gt;)pRadius &lt;/span&gt;&lt;span style="color:#000000;"&gt;!= radius)
        {
            &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;&lt;span style="color:#000000;"&gt; ii = (i*sideLength)+j;
            andMaskCursor[ii/8] =
                (&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;byte&lt;/span&gt;&lt;span style="color:#000000;"&gt;)Math.Pow(2, 7-ii%8);
        }
    }
}&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;
&lt;p&gt;That's all! Enjoy. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11303117-111090951539769083?l=csharparticles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharparticles.blogspot.com/feeds/111090951539769083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11303117&amp;postID=111090951539769083' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/111090951539769083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/111090951539769083'/><link rel='alternate' type='text/html' href='http://csharparticles.blogspot.com/2005/03/custom-drawing-cursors.html' title='Custom drawing cursors'/><author><name>Mike Chaliy</name><uri>http://www.blogger.com/profile/09666351498842887203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11303117.post-111025626839853843</id><published>2005-03-08T05:09:00.000+02:00</published><updated>2006-04-27T20:35:20.550+03:00</updated><title type='text'>Beep, MessageBeep</title><content type='html'>&lt;p&gt;
Here is three very simple methods to Beep.
&lt;/p&gt;
&lt;p&gt;
&lt;ul&gt;
&lt;li&gt;
 Most simple way.
&lt;span class="text-code"&gt;&lt;pre&gt;&lt;font color="#000000"&gt;Console&lt;/font&gt;&lt;font color="#000000"&gt;.&lt;/font&gt;&lt;font color="#000000"&gt;WriteLine&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#800080"&gt;"\a"&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#000000"&gt;;&lt;/font&gt;&lt;/pre&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;li&gt;
 Second one is WinAPI MessageBeep function using PInvoke.
&lt;span class="text-code"&gt;
&lt;pre&gt;
&lt;font color="#0000FF"&gt;using&lt;/font&gt;&lt;font color="#000000"&gt; System&lt;/font&gt;&lt;font color="#000000"&gt;;&lt;/font&gt;
&lt;font color="#0000FF"&gt;using&lt;/font&gt;&lt;font color="#000000"&gt; System&lt;/font&gt;&lt;font color="#000000"&gt;.&lt;/font&gt;&lt;font color="#000000"&gt;Runtime&lt;/font&gt;&lt;font color="#000000"&gt;.&lt;/font&gt;&lt;font color="#000000"&gt;InteropServices&lt;/font&gt;&lt;font color="#000000"&gt;;&lt;/font&gt;
&lt;font color="#000000"&gt;&lt;/font&gt;
&lt;font color="#0000FF"&gt;public&lt;/font&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;font color="#0000FF"&gt;class&lt;/font&gt;&lt;font color="#000000"&gt; _Main&lt;/font&gt;
&lt;font color="#000000"&gt;{&lt;/font&gt;
&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;font color="#0000FF"&gt;#region&lt;/font&gt;&lt;font color="#000000"&gt; Win32&lt;/font&gt;
&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;font color="#000000"&gt;[&lt;/font&gt;&lt;font color="#000000"&gt;DllImport&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#800080"&gt;"user32.dll"&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#000000"&gt;]&lt;/font&gt;
&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;font color="#0000FF"&gt;static&lt;/font&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;font color="#0000FF"&gt;extern&lt;/font&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;font color="#0000FF"&gt;void&lt;/font&gt;&lt;font color="#000000"&gt; MessageBeep&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#0000FF"&gt;uint&lt;/font&gt;&lt;font color="#000000"&gt; uType&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#000000"&gt;;&lt;/font&gt;&lt;font color="#000000"&gt; &lt;/font&gt;
&lt;font color="#000000"&gt;    &lt;/font&gt;
&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;font color="#0000FF"&gt;const&lt;/font&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;font color="#0000FF"&gt;uint&lt;/font&gt;&lt;font color="#000000"&gt; MB_OK                &lt;/font&gt;&lt;font color="#000000"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt; 0x00000000&lt;/font&gt;&lt;font color="#000000"&gt;;&lt;/font&gt;
&lt;font color="#000000"&gt;    &lt;/font&gt;
&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;font color="#0000FF"&gt;const&lt;/font&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;font color="#0000FF"&gt;uint&lt;/font&gt;&lt;font color="#000000"&gt; MB_ICONHAND          &lt;/font&gt;&lt;font color="#000000"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt; 0x00000010&lt;/font&gt;&lt;font color="#000000"&gt;;&lt;/font&gt;
&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;font color="#0000FF"&gt;const&lt;/font&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;font color="#0000FF"&gt;uint&lt;/font&gt;&lt;font color="#000000"&gt; MB_ICONQUESTION      &lt;/font&gt;&lt;font color="#000000"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt; 0x00000020&lt;/font&gt;&lt;font color="#000000"&gt;;&lt;/font&gt;
&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;font color="#0000FF"&gt;const&lt;/font&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;font color="#0000FF"&gt;uint&lt;/font&gt;&lt;font color="#000000"&gt; MB_ICONEXCLAMATION   &lt;/font&gt;&lt;font color="#000000"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt; 0x00000030&lt;/font&gt;&lt;font color="#000000"&gt;;&lt;/font&gt;
&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;font color="#0000FF"&gt;const&lt;/font&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;font color="#0000FF"&gt;uint&lt;/font&gt;&lt;font color="#000000"&gt; MB_ICONASTERISK      &lt;/font&gt;&lt;font color="#000000"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt; 0x00000040&lt;/font&gt;&lt;font color="#000000"&gt;;&lt;/font&gt;
&lt;font color="#000000"&gt;    &lt;/font&gt;
&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;font color="#0000FF"&gt;#endregion&lt;/font&gt;
&lt;font color="#000000"&gt;&lt;/font&gt;
&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;font color="#0000FF"&gt;public&lt;/font&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;font color="#0000FF"&gt;static&lt;/font&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;font color="#0000FF"&gt;void&lt;/font&gt;&lt;font color="#000000"&gt; Main&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;
&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;
&lt;font color="#000000"&gt;        MessageBeep&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#000000"&gt;MB_ICONEXCLAMATION&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#000000"&gt;;&lt;/font&gt;
&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;
&lt;font color="#000000"&gt;}&lt;/font&gt;
&lt;/pre&gt;
&lt;/span&gt;
&lt;/li&gt;
&lt;li&gt;
 Third is PInvoke too. This is WinAPI &lt;b&gt;Beep&lt;/b&gt; function.
&lt;span class="text-code"&gt;
&lt;pre&gt;
&lt;font color="#0000FF"&gt;using&lt;/font&gt;&lt;font color="#000000"&gt; System&lt;/font&gt;&lt;font color="#000000"&gt;;&lt;/font&gt;
&lt;font color="#0000FF"&gt;using&lt;/font&gt;&lt;font color="#000000"&gt; System&lt;/font&gt;&lt;font color="#000000"&gt;.&lt;/font&gt;&lt;font color="#000000"&gt;Runtime&lt;/font&gt;&lt;font color="#000000"&gt;.&lt;/font&gt;&lt;font color="#000000"&gt;InteropServices&lt;/font&gt;&lt;font color="#000000"&gt;;&lt;/font&gt;
&lt;font color="#000000"&gt;&lt;/font&gt;
&lt;font color="#0000FF"&gt;public&lt;/font&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;font color="#0000FF"&gt;class&lt;/font&gt;&lt;font color="#000000"&gt; _Main&lt;/font&gt;
&lt;font color="#000000"&gt;{&lt;/font&gt;
&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;font color="#0000FF"&gt;#region&lt;/font&gt;&lt;font color="#000000"&gt; Win32&lt;/font&gt;
&lt;font color="#000000"&gt;    &lt;/font&gt;
&lt;font color="#000000"&gt;    [DllImport(&lt;/font&gt;&lt;font color="#800080"&gt;"Kernel32.dll"&lt;/font&gt;&lt;font color="#000000"&gt;)]&lt;br&gt;    &lt;/font&gt;&lt;font color="#0000FF"&gt;static&lt;/font&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;font color="#0000FF"&gt;extern&lt;/font&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;font color="#0000FF"&gt;bool&lt;/font&gt;&lt;font color="#000000"&gt; Beep&lt;/font&gt;&lt;font color="#000000"&gt;(
        &lt;/font&gt;&lt;font color="#0000FF"&gt;uint&lt;/font&gt;&lt;font color="#000000"&gt; dwFreq,&lt;/font&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;font color="#0000FF"&gt;uint&lt;/font&gt;&lt;font color="#000000"&gt; dwDuration
    );&lt;/font&gt;
&lt;font color="#000000"&gt;    &lt;/font&gt;
&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;font color="#0000FF"&gt;#endregion&lt;/font&gt;
&lt;font color="#000000"&gt;&lt;/font&gt;
&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;font color="#0000FF"&gt;public&lt;/font&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;font color="#0000FF"&gt;static&lt;/font&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;font color="#0000FF"&gt;void&lt;/font&gt;&lt;font color="#000000"&gt; Main&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;
&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;
&lt;font color="#000000"&gt;        Beep&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#000000"&gt;150&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#000000"&gt; 150&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#000000"&gt;;&lt;/font&gt;
&lt;font color="#000000"&gt;    &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;
&lt;font color="#000000"&gt;}&lt;/font&gt;
&lt;/pre&gt;
&lt;/span&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;MSDN:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;MessageBeep function&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
The &lt;b&gt;MessageBeep&lt;/b&gt; function plays a waveform sound. The waveform sound for each sound type is identified by an entry in the registry.
&lt;H4&gt;Parameters&lt;/H4&gt;
&lt;strong&gt;uType:&lt;/strong&gt;Sound type, as identified by an entry in the registry.
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Beep function&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
The &lt;b&gt;Beep&lt;/b&gt; function generates simple tones on the speaker. The function is synchronous; it does not return control to its caller until the sound finishes.
&lt;H4&gt;Parameters&lt;/H4&gt;
&lt;strong&gt;dwFreq:&lt;/strong&gt;Frequency of the sound, in hertz. This parameter must be in the range 37 through 32,767 (0x25 through 0x7FFF). 
&lt;strong&gt;dwDuration:&lt;/strong&gt;Duration of the sound, in milliseconds. 
&lt;H4&gt;Return Values:&lt;/H4&gt;If the function succeeds, the return value is true. If the function fails, the return value is false.
&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11303117-111025626839853843?l=csharparticles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharparticles.blogspot.com/feeds/111025626839853843/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11303117&amp;postID=111025626839853843' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/111025626839853843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11303117/posts/default/111025626839853843'/><link rel='alternate' type='text/html' href='http://csharparticles.blogspot.com/2005/03/beep-messagebeep.html' title='Beep, MessageBeep'/><author><name>Mike Chaliy</name><uri>http://www.blogger.com/profile/09666351498842887203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
