<?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>Mystalia Studios &#187; programming</title>
	<atom:link href="http://www.mystalia.net/tag/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mystalia.net</link>
	<description>Coding Studio</description>
	<lastBuildDate>Fri, 19 Mar 2010 01:22:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>C# Textbox and AutoCompleteMode Conflicts with KeyPress.</title>
		<link>http://www.mystalia.net/2008/07/c-textbox-and-autocompletemode-conflicts-with-keypress/</link>
		<comments>http://www.mystalia.net/2008/07/c-textbox-and-autocompletemode-conflicts-with-keypress/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 14:07:13 +0000</pubDate>
		<dc:creator>Mystalia</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[autocomplete]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[keydown]]></category>
		<category><![CDATA[keypress]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[textbox]]></category>

		<guid isPermaLink="false">http://www.mystalia.net/?p=20</guid>
		<description><![CDATA[Ok, personally I was using a textbox and when you pressed &#8220;Enter&#8221; it would complete a task, BUT I also wanted the textbox to be autocompletive (if that&#8217;s a valid term). When I actually went to test it all out I found that instead of running the Keypress event, it just highlighted the text and [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, personally I was using a textbox and when you pressed &#8220;Enter&#8221; it would complete a task, BUT I also wanted the textbox to be autocompletive (if that&#8217;s a valid term).</p>
<p>When I actually went to test it all out I found that instead of running the Keypress event, it just highlighted the text and did nothing else&#8230; Googled to find there is no valid reason why, but there is a work around, and it&#8217;s simple.</p>
<p>Abandon KeyPress and use the KeyDown function, setup your keydown event correctly, and it will work.</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">void</span> textBox1_KeyDown<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">object</span> sender, KeyEventArgs e<span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>e<span style="color: #008000;">.</span><span style="color: #0000FF;">KeyCode</span> <span style="color: #008000;">==</span> Keys<span style="color: #008000;">.</span><span style="color: #0000FF;">Enter</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.mystalia.net/2008/07/c-textbox-and-autocompletemode-conflicts-with-keypress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Suppress WMP ActiveX Error &#8220;Bad Image&#8221; in C#</title>
		<link>http://www.mystalia.net/2008/05/suppress-wmp-activex-error-bad-image-in-c/</link>
		<comments>http://www.mystalia.net/2008/05/suppress-wmp-activex-error-bad-image-in-c/#comments</comments>
		<pubDate>Mon, 26 May 2008 21:16:28 +0000</pubDate>
		<dc:creator>Mystalia</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[bad image]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[vista]]></category>
		<category><![CDATA[windows media player]]></category>

		<guid isPermaLink="false">http://www.mystalia.net/?p=11</guid>
		<description><![CDATA[For some reason, the Visual Studio debugger suppresses this automatically, but the release does not. It has something to do with DRM signatures, anyway the fix is to open up the entry point in the application (program.cs) and make these changes&#8230; using System; using System.Collections.Generic; using System.Windows.Forms; &#60;span style=&#34;color: #ff0000;&#34;&#62; using System.Runtime.InteropServices;&#60;/span&#62; namespace Program { [...]]]></description>
			<content:encoded><![CDATA[<p>For some reason, the Visual Studio debugger suppresses this automatically, but the release does not.<br />
It has something to do with DRM signatures, anyway the fix is to open up the entry point in the application (program.cs) and make these changes&#8230;</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">using System;<br />
using System.Collections.Generic;<br />
using System.Windows.Forms;<br />
&lt;span style=&quot;color: #ff0000;&quot;&gt; using System.Runtime.InteropServices;&lt;/span&gt;</div></div>
<p>namespace Program<br />
{<br />
<span style="color: #ff0000;"> [Flags]<br />
public enum ErrorModes : uint<br />
{<br />
SYSTEM_DEFAULT = 0&#215;0,<br />
SEM_FAILCRITICALERRORS = 0&#215;0001,<br />
SEM_NOALIGNMENTFAULTEXCEPT = 0&#215;0004,<br />
SEM_NOGPFAULTERRORBOX = 0&#215;0002,<br />
SEM_NOOPENFILEERRORBOX = 0&#215;8000<br />
}</span></p>
<p>static class Program<br />
{<br />
<span style="color: #ff0000;"> // Suppresses &#8220;Bad Image&#8221; error.<br />
[DllImport("kernel32.dll")]<br />
static extern ErrorModes SetErrorMode(ErrorModes uMode);<br />
[DllImport("kernel32.dll")]<br />
static extern ErrorModes GetErrorMode();</span><br />
///<br />
/// The main entry point for the application.<br />
///<br />
[STAThread]<br />
static void Main(string[] Args)<br />
{<br />
<span style="color: #ff0000;"> SetErrorMode(ErrorModes.SEM_FAILCRITICALERRORS);</span><br />
Application.EnableVisualStyles();<br />
Application.SetCompatibleTextRenderingDefault(false);<br />
Application.Run(new Form1(Args));<br />
}<br />
}<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mystalia.net/2008/05/suppress-wmp-activex-error-bad-image-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
