<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: XNA 3.0 and Winforms, the easy way</title>
	<atom:link href="http://royalexander.wordpress.com/2008/10/09/xna-30-and-winforms-the-easy-way/feed/" rel="self" type="application/rss+xml" />
	<link>http://royalexander.wordpress.com/2008/10/09/xna-30-and-winforms-the-easy-way/</link>
	<description>My programming world</description>
	<lastBuildDate>Fri, 30 Oct 2009 17:14:43 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Woj</title>
		<link>http://royalexander.wordpress.com/2008/10/09/xna-30-and-winforms-the-easy-way/#comment-367</link>
		<dc:creator>Woj</dc:creator>
		<pubDate>Wed, 21 Oct 2009 18:20:02 +0000</pubDate>
		<guid isPermaLink="false">http://royalexander.wordpress.com/?p=55#comment-367</guid>
		<description>figured it out, my fault. just wasn&#039;t updating camera movement... embarrassing...</description>
		<content:encoded><![CDATA[<p>figured it out, my fault. just wasn&#8217;t updating camera movement&#8230; embarrassing&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Woj</title>
		<link>http://royalexander.wordpress.com/2008/10/09/xna-30-and-winforms-the-easy-way/#comment-366</link>
		<dc:creator>Woj</dc:creator>
		<pubDate>Wed, 21 Oct 2009 17:30:20 +0000</pubDate>
		<guid isPermaLink="false">http://royalexander.wordpress.com/?p=55#comment-366</guid>
		<description>i have a treeview control on the form that has a list of objects that i can select to add to my scene.  everything except xna keyboard input is working.  I want to use W, A, S, D to move my camera around however whenever i hit any keyboard buttons it only selects the corresponding item in the tree view instead of using using KeyboardState.IsKeyDown(Keys.W) etc.  

I got the mouse working fine using Mouse.WindowHandle = drawSurce, however i dont see an option do to this for the keyboard.  I assume it has something to do with the current focus, but i&#039;m not sure how to approach the solution.

Thanks</description>
		<content:encoded><![CDATA[<p>i have a treeview control on the form that has a list of objects that i can select to add to my scene.  everything except xna keyboard input is working.  I want to use W, A, S, D to move my camera around however whenever i hit any keyboard buttons it only selects the corresponding item in the tree view instead of using using KeyboardState.IsKeyDown(Keys.W) etc.  </p>
<p>I got the mouse working fine using Mouse.WindowHandle = drawSurce, however i dont see an option do to this for the keyboard.  I assume it has something to do with the current focus, but i&#8217;m not sure how to approach the solution.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nstod</title>
		<link>http://royalexander.wordpress.com/2008/10/09/xna-30-and-winforms-the-easy-way/#comment-311</link>
		<dc:creator>nstod</dc:creator>
		<pubDate>Thu, 06 Aug 2009 21:15:18 +0000</pubDate>
		<guid isPermaLink="false">http://royalexander.wordpress.com/?p=55#comment-311</guid>
		<description>Hey, just wanted to give you a heads up on this.  I, too, thought this was extremely slow, until I figured out that it&#039;s only really slow if your window is not active.  If you de-activate the window and then re-activate it (by clicking on another window then clicking back), you should see a dramatic increase in FPS.

An easy way to fix this is to set your Game.InactiveSleepTime parameter.  If you set it to System.TimeSpan.Zero, your game will run full speed all the time.  I personally have mine set to 10000 ticks so it doesn&#039;t use a full CPU core when inactive, but doesn&#039;t come to a halt.  Give that a shot.</description>
		<content:encoded><![CDATA[<p>Hey, just wanted to give you a heads up on this.  I, too, thought this was extremely slow, until I figured out that it&#8217;s only really slow if your window is not active.  If you de-activate the window and then re-activate it (by clicking on another window then clicking back), you should see a dramatic increase in FPS.</p>
<p>An easy way to fix this is to set your Game.InactiveSleepTime parameter.  If you set it to System.TimeSpan.Zero, your game will run full speed all the time.  I personally have mine set to 10000 ticks so it doesn&#8217;t use a full CPU core when inactive, but doesn&#8217;t come to a halt.  Give that a shot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: royalexander</title>
		<link>http://royalexander.wordpress.com/2008/10/09/xna-30-and-winforms-the-easy-way/#comment-251</link>
		<dc:creator>royalexander</dc:creator>
		<pubDate>Tue, 30 Jun 2009 08:25:21 +0000</pubDate>
		<guid isPermaLink="false">http://royalexander.wordpress.com/?p=55#comment-251</guid>
		<description>I haven&#039;t seen any fps differences at all tbh, but maybe you do some heavy stuff in your winforms? Anyway try the creators example to see if that one gives you a better example. ( http://www.creators.xna.com )</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t seen any fps differences at all tbh, but maybe you do some heavy stuff in your winforms? Anyway try the creators example to see if that one gives you a better example. ( <a href="http://www.creators.xna.com" rel="nofollow">http://www.creators.xna.com</a> )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shuya</title>
		<link>http://royalexander.wordpress.com/2008/10/09/xna-30-and-winforms-the-easy-way/#comment-250</link>
		<dc:creator>Shuya</dc:creator>
		<pubDate>Mon, 29 Jun 2009 21:46:54 +0000</pubDate>
		<guid isPermaLink="false">http://royalexander.wordpress.com/?p=55#comment-250</guid>
		<description>It&#039;s quite slow. =/ If you redirect the XNA window into a PictureBox you won&#039;t get the same FPS.</description>
		<content:encoded><![CDATA[<p>It&#8217;s quite slow. =/ If you redirect the XNA window into a PictureBox you won&#8217;t get the same FPS.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Toda</title>
		<link>http://royalexander.wordpress.com/2008/10/09/xna-30-and-winforms-the-easy-way/#comment-244</link>
		<dc:creator>Toda</dc:creator>
		<pubDate>Thu, 25 Jun 2009 13:04:54 +0000</pubDate>
		<guid isPermaLink="false">http://royalexander.wordpress.com/?p=55#comment-244</guid>
		<description>The nly problem is that it recognises mouse presses outside the picturearea, argh!</description>
		<content:encoded><![CDATA[<p>The nly problem is that it recognises mouse presses outside the picturearea, argh!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomahawk</title>
		<link>http://royalexander.wordpress.com/2008/10/09/xna-30-and-winforms-the-easy-way/#comment-243</link>
		<dc:creator>Tomahawk</dc:creator>
		<pubDate>Thu, 25 Jun 2009 12:28:44 +0000</pubDate>
		<guid isPermaLink="false">http://royalexander.wordpress.com/?p=55#comment-243</guid>
		<description>Guys,

I&#039;ve got really nice effect engaging xWinForms, the beta version. Although it needs to be adjusted to your needs, you&#039;ve got many Controls available. The downside is missing documentation and you must recognize product on your own. Look at demo of 1.0 version on youtube. 
I&#039;ve managed to get application with one window, which is basic XNA game window and second window containing WinForms. Really good software.</description>
		<content:encoded><![CDATA[<p>Guys,</p>
<p>I&#8217;ve got really nice effect engaging xWinForms, the beta version. Although it needs to be adjusted to your needs, you&#8217;ve got many Controls available. The downside is missing documentation and you must recognize product on your own. Look at demo of 1.0 version on youtube.<br />
I&#8217;ve managed to get application with one window, which is basic XNA game window and second window containing WinForms. Really good software.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Toda</title>
		<link>http://royalexander.wordpress.com/2008/10/09/xna-30-and-winforms-the-easy-way/#comment-242</link>
		<dc:creator>Toda</dc:creator>
		<pubDate>Thu, 25 Jun 2009 12:02:52 +0000</pubDate>
		<guid isPermaLink="false">http://royalexander.wordpress.com/?p=55#comment-242</guid>
		<description>Im not good with delegates but I sourt of found one solution.
Instead of passing the IntPtr to game I did:
&lt;code&gt;
Form1 form = new Form1();
            form.Show();
            Game1 game = new Game1(form);
&lt;/code&gt;

In program.cs

Then in the constructor of game1:
&lt;code&gt;
{
...
 System.Windows.Forms.Button.FromHandle(form.getMyButton1Handle()).Click += new EventHandler(do_something_when buttonpressed);
}

do_something_when buttonpressed(object sender, EventArgs e)
{
//Do the code here like:
mygameobject.setEnemySpawnType(1);
}
&lt;/code&gt;
And in the form class(Form1.cs):
&lt;code&gt;
public IntPtr getMyButton1Handle()
{
return mybutton.Handle;
}&lt;/code&gt;

I would rather catch the events in the specific gameobject but don&#039;t know how. This way works as long as the gameclass has a reference to the class whos method needs to be called. I do NOT however know for instance if I have a textfield, how do I get the value there?

My knowledge in handlers and delegates are close to 0, just by trial and error and googling I found this solution</description>
		<content:encoded><![CDATA[<p>Im not good with delegates but I sourt of found one solution.<br />
Instead of passing the IntPtr to game I did:<br />
<code><br />
Form1 form = new Form1();<br />
            form.Show();<br />
            Game1 game = new Game1(form);<br />
</code></p>
<p>In program.cs</p>
<p>Then in the constructor of game1:<br />
<code><br />
{<br />
...<br />
 System.Windows.Forms.Button.FromHandle(form.getMyButton1Handle()).Click += new EventHandler(do_something_when buttonpressed);<br />
}</p>
<p>do_something_when buttonpressed(object sender, EventArgs e)<br />
{<br />
//Do the code here like:<br />
mygameobject.setEnemySpawnType(1);<br />
}<br />
</code><br />
And in the form class(Form1.cs):<br />
<code><br />
public IntPtr getMyButton1Handle()<br />
{<br />
return mybutton.Handle;<br />
}</code></p>
<p>I would rather catch the events in the specific gameobject but don&#8217;t know how. This way works as long as the gameclass has a reference to the class whos method needs to be called. I do NOT however know for instance if I have a textfield, how do I get the value there?</p>
<p>My knowledge in handlers and delegates are close to 0, just by trial and error and googling I found this solution</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Toda</title>
		<link>http://royalexander.wordpress.com/2008/10/09/xna-30-and-winforms-the-easy-way/#comment-241</link>
		<dc:creator>Toda</dc:creator>
		<pubDate>Thu, 25 Jun 2009 11:56:57 +0000</pubDate>
		<guid isPermaLink="false">http://royalexander.wordpress.com/?p=55#comment-241</guid>
		<description>Actually I do not have to. That method works great.</description>
		<content:encoded><![CDATA[<p>Actually I do not have to. That method works great.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: royalexander</title>
		<link>http://royalexander.wordpress.com/2008/10/09/xna-30-and-winforms-the-easy-way/#comment-240</link>
		<dc:creator>royalexander</dc:creator>
		<pubDate>Thu, 25 Jun 2009 11:31:37 +0000</pubDate>
		<guid isPermaLink="false">http://royalexander.wordpress.com/?p=55#comment-240</guid>
		<description>Hey Toda, you should just make a method yourself that substracts the left of the gamescreencomponent from the x coordinate of the mouse (and the same for the top of the gsc and the y of the mouse).</description>
		<content:encoded><![CDATA[<p>Hey Toda, you should just make a method yourself that substracts the left of the gamescreencomponent from the x coordinate of the mouse (and the same for the top of the gsc and the y of the mouse).</p>
]]></content:encoded>
	</item>
</channel>
</rss>
