<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for Ness&#039; Outpost</title>
	<atom:link href="http://www.nesser.org/blog/comments/feed" rel="self" type="application/rss+xml" />
	<link>http://www.nesser.org/blog</link>
	<description>A window into the life of a humble Software Engineering EIT</description>
	<lastBuildDate>Wed, 16 Nov 2011 00:17:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>Comment on Amsoil Dealer by Vadimus</title>
		<link>http://www.nesser.org/blog/archives/419/comment-page-1#comment-54668</link>
		<dc:creator>Vadimus</dc:creator>
		<pubDate>Wed, 16 Nov 2011 00:17:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.nesser.org/blog/?p=419#comment-54668</guid>
		<description>What do you recommend for Outlander 5w20 Signature or XL?</description>
		<content:encoded><![CDATA[<p>What do you recommend for Outlander 5w20 Signature or XL?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Meat Pies &amp; A Rack of Lamb by Mom</title>
		<link>http://www.nesser.org/blog/archives/283/comment-page-1#comment-46095</link>
		<dc:creator>Mom</dc:creator>
		<pubDate>Sun, 20 Feb 2011 12:28:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.nesser.org/blog/?p=283#comment-46095</guid>
		<description>They were deliscious!  :O
Thank you!</description>
		<content:encoded><![CDATA[<p>They were deliscious!  :O<br />
Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on .Net CF Single Instance Program by RHMK</title>
		<link>http://www.nesser.org/blog/archives/56/comment-page-1#comment-45705</link>
		<dc:creator>RHMK</dc:creator>
		<pubDate>Mon, 07 Feb 2011 05:58:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.nesser.org/blog/?p=56#comment-45705</guid>
		<description>Thanks for your great help :)</description>
		<content:encoded><![CDATA[<p>Thanks for your great help :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Weed Eater GTI-16 Gas String Trimmer by Nesser</title>
		<link>http://www.nesser.org/blog/archives/135/comment-page-1#comment-44879</link>
		<dc:creator>Nesser</dc:creator>
		<pubDate>Fri, 14 Jan 2011 02:25:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.nesser.org/blog/?p=135#comment-44879</guid>
		<description>The manual says the Spark plug is a Champion (RCJ-8) with a spark plug gap of 0.064cm or 0.025&quot;.</description>
		<content:encoded><![CDATA[<p>The manual says the Spark plug is a Champion (RCJ-8) with a spark plug gap of 0.064cm or 0.025&#8243;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Weed Eater GTI-16 Gas String Trimmer by charmain</title>
		<link>http://www.nesser.org/blog/archives/135/comment-page-1#comment-44788</link>
		<dc:creator>charmain</dc:creator>
		<pubDate>Tue, 11 Jan 2011 12:17:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.nesser.org/blog/?p=135#comment-44788</guid>
		<description>I have picked up my dad&#039;s gti16 weed eater. my dad is not in the living. the spark plug is missing. I have no model no for this part. can you kindly let me know the part no please.</description>
		<content:encoded><![CDATA[<p>I have picked up my dad&#8217;s gti16 weed eater. my dad is not in the living. the spark plug is missing. I have no model no for this part. can you kindly let me know the part no please.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on .Net CF Single Instance Program by Andy Harvey</title>
		<link>http://www.nesser.org/blog/archives/56/comment-page-1#comment-43868</link>
		<dc:creator>Andy Harvey</dc:creator>
		<pubDate>Wed, 15 Dec 2010 12:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.nesser.org/blog/?p=56#comment-43868</guid>
		<description>Nesser, Thanks a lot for your quick reply,

Here is what I want to do:

I have a main application and I have a -like starter- application, the starter application starts with Windows and it has one form that has a button that starts the main application. The starter application is responsible for preventing the user from accessing the windows common features, the user is allowed to start the main application only.

My problem is:
sometimes the user presses the [Main Application] button on &quot;Start Application&quot; several times, and in most cases the running [Main Application] gets hidden under the &quot;Starter Application&quot;, I applied your code snippet &quot;the original code snipped&quot; to prevent the creation and start of another instance of the [Main Application] when it gets hidden, it works fine, but it doesn&#039;t bring the hidden instance of the [Main Application] from the background. For that reason I used the &quot;restore code&quot; -written by neno&quot; to bring the running instance of the [Main Application] in the front, but it doesn&#039;t work :(

I think the problem is in &quot;Form1&quot;, I don&#039;t want it to restore the first form of the application &quot;the start form&quot;, I just want it to restore the latest opened form, like the normal windows mobile handling scenario.

Thanks,</description>
		<content:encoded><![CDATA[<p>Nesser, Thanks a lot for your quick reply,</p>
<p>Here is what I want to do:</p>
<p>I have a main application and I have a -like starter- application, the starter application starts with Windows and it has one form that has a button that starts the main application. The starter application is responsible for preventing the user from accessing the windows common features, the user is allowed to start the main application only.</p>
<p>My problem is:<br />
sometimes the user presses the [Main Application] button on &#8220;Start Application&#8221; several times, and in most cases the running [Main Application] gets hidden under the &#8220;Starter Application&#8221;, I applied your code snippet &#8220;the original code snipped&#8221; to prevent the creation and start of another instance of the [Main Application] when it gets hidden, it works fine, but it doesn&#8217;t bring the hidden instance of the [Main Application] from the background. For that reason I used the &#8220;restore code&#8221; -written by neno&#8221; to bring the running instance of the [Main Application] in the front, but it doesn&#8217;t work :(</p>
<p>I think the problem is in &#8220;Form1&#8243;, I don&#8217;t want it to restore the first form of the application &#8220;the start form&#8221;, I just want it to restore the latest opened form, like the normal windows mobile handling scenario.</p>
<p>Thanks,</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on .Net CF Single Instance Program by Nesser</title>
		<link>http://www.nesser.org/blog/archives/56/comment-page-1#comment-43814</link>
		<dc:creator>Nesser</dc:creator>
		<pubDate>Tue, 14 Dec 2010 16:02:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.nesser.org/blog/?p=56#comment-43814</guid>
		<description>Andy, I&#039;m not sure exactly what you are trying to do.

The original code snippet is used to TERMINATE a duplicate application from being started in the small amount of time that the windows mobile OS is setting up the application.  Try not to do a lot of things before calling Application.Run(YourFormClass) with the form your application should show on startup.  Read up on that system call.

Once the application is started and running any attempt to start the application again should cause the operating system to bring it to the foreground as it was last seen unless it has been exited by yourself or shutdown by the OS to conserve resources.

I didn&#039;t write the &quot;restore code&quot; - neno did.  But look at his pInvoke call and you&#039;ll see that &quot;Form1&quot; is the string of the form name in your application he is looking to restore - I would suggest using the same form name you use in your Application.Run(YourFormClass) call.</description>
		<content:encoded><![CDATA[<p>Andy, I&#8217;m not sure exactly what you are trying to do.</p>
<p>The original code snippet is used to TERMINATE a duplicate application from being started in the small amount of time that the windows mobile OS is setting up the application.  Try not to do a lot of things before calling Application.Run(YourFormClass) with the form your application should show on startup.  Read up on that system call.</p>
<p>Once the application is started and running any attempt to start the application again should cause the operating system to bring it to the foreground as it was last seen unless it has been exited by yourself or shutdown by the OS to conserve resources.</p>
<p>I didn&#8217;t write the &#8220;restore code&#8221; &#8211; neno did.  But look at his pInvoke call and you&#8217;ll see that &#8220;Form1&#8243; is the string of the form name in your application he is looking to restore &#8211; I would suggest using the same form name you use in your Application.Run(YourFormClass) call.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on .Net CF Single Instance Program by Andy Harvey</title>
		<link>http://www.nesser.org/blog/archives/56/comment-page-1#comment-43812</link>
		<dc:creator>Andy Harvey</dc:creator>
		<pubDate>Tue, 14 Dec 2010 15:39:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.nesser.org/blog/?p=56#comment-43812</guid>
		<description>About the code that restores the currently running instance, code above:
in the code inside the if statement: if (IsInstanceRunning())
The statement:

IntPtr h = FindWindow(IntPtr.Zero, &quot;Form1&quot;);

What is meant by &quot;Form1&quot;, again should I left it as it is, or change it with the form that run at the program.start(); method?

But I don&#039;t know if the user is currently on this form or any other from inside the application</description>
		<content:encoded><![CDATA[<p>About the code that restores the currently running instance, code above:<br />
in the code inside the if statement: if (IsInstanceRunning())<br />
The statement:</p>
<p>IntPtr h = FindWindow(IntPtr.Zero, &#8220;Form1&#8243;);</p>
<p>What is meant by &#8220;Form1&#8243;, again should I left it as it is, or change it with the form that run at the program.start(); method?</p>
<p>But I don&#8217;t know if the user is currently on this form or any other from inside the application</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on .Net CF Single Instance Program by Andy Harvey</title>
		<link>http://www.nesser.org/blog/archives/56/comment-page-1#comment-43808</link>
		<dc:creator>Andy Harvey</dc:creator>
		<pubDate>Tue, 14 Dec 2010 14:52:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.nesser.org/blog/?p=56#comment-43808</guid>
		<description>Hi,

for the code above, for the method IsInstanceRunning()

IntPtr hMutex = CreateMutex( IntPtr.Zero, true, &quot;ApplicationName&quot; );

I believe, I have to change &quot;ApplicationName&quot; with the name of my application, right?

Cause I forgot to do so, but it worked fine ! if there already is an instance, it returns. That&#039;s strange, or should I leave &quot;ApplicationName&quot; as it is, as someone earlier said &quot;Copy and Paste&quot;.

I also need a code to put the current running instance in the foreground, as it is hidden behind another running application. Is there a way to do so?

Thanks,</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>for the code above, for the method IsInstanceRunning()</p>
<p>IntPtr hMutex = CreateMutex( IntPtr.Zero, true, &#8220;ApplicationName&#8221; );</p>
<p>I believe, I have to change &#8220;ApplicationName&#8221; with the name of my application, right?</p>
<p>Cause I forgot to do so, but it worked fine ! if there already is an instance, it returns. That&#8217;s strange, or should I leave &#8220;ApplicationName&#8221; as it is, as someone earlier said &#8220;Copy and Paste&#8221;.</p>
<p>I also need a code to put the current running instance in the foreground, as it is hidden behind another running application. Is there a way to do so?</p>
<p>Thanks,</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on .Net CF Single Instance Program by Paul</title>
		<link>http://www.nesser.org/blog/archives/56/comment-page-1#comment-42456</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Thu, 11 Nov 2010 13:33:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.nesser.org/blog/?p=56#comment-42456</guid>
		<description>You&#039;re not calling ReleaseMutex in this code, will this not stop your application ever running again until the device is reset?</description>
		<content:encoded><![CDATA[<p>You&#8217;re not calling ReleaseMutex in this code, will this not stop your application ever running again until the device is reset?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

