<?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 on: Arrange By Image</title>
	<atom:link href="http://officewarfare.net/index.php/arrange-by-image/feed/" rel="self" type="application/rss+xml" />
	<link>http://officewarfare.net</link>
	<description>Articles and software about and for warring with your co-workers</description>
	<lastBuildDate>Thu, 29 Jul 2010 00:06:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Josh</title>
		<link>http://officewarfare.net/index.php/arrange-by-image/comment-page-1/#comment-460</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Tue, 23 Feb 2010 19:43:46 +0000</pubDate>
		<guid isPermaLink="false">http://officewarfare.net/?page_id=178#comment-460</guid>
		<description>Howdy samuel, I would love to try to help you get ArrangeByImage working.  That error your getting if a bit of a generic one it happens when the program is attempting to get details about the desktop, size and icon count as well as when it is trying to actually move icons around.  It is entirely possible that you need to be local admin for some of these functions so I would check that.  Beyond that I didnt actually write that portion of the code so perhaps folling the link back to the site that I got the code from originally mide provide you some more clues.</description>
		<content:encoded><![CDATA[<p>Howdy samuel, I would love to try to help you get ArrangeByImage working.  That error your getting if a bit of a generic one it happens when the program is attempting to get details about the desktop, size and icon count as well as when it is trying to actually move icons around.  It is entirely possible that you need to be local admin for some of these functions so I would check that.  Beyond that I didnt actually write that portion of the code so perhaps folling the link back to the site that I got the code from originally mide provide you some more clues.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lamour samuel</title>
		<link>http://officewarfare.net/index.php/arrange-by-image/comment-page-1/#comment-459</link>
		<dc:creator>lamour samuel</dc:creator>
		<pubDate>Tue, 23 Feb 2010 19:29:59 +0000</pubDate>
		<guid isPermaLink="false">http://officewarfare.net/?page_id=178#comment-459</guid>
		<description>pls, i like this software but is difficult to download. i have been trying to download it since 11am till now 8.30pm, couldn&#039;t do it. it always say error in icon arrangement. my laptop is HP pavilion 3000. pls help me. i like the software so much.......bye hope to hear from you soon</description>
		<content:encoded><![CDATA[<p>pls, i like this software but is difficult to download. i have been trying to download it since 11am till now 8.30pm, couldn&#8217;t do it. it always say error in icon arrangement. my laptop is HP pavilion 3000. pls help me. i like the software so much&#8230;&#8230;.bye hope to hear from you soon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joshua</title>
		<link>http://officewarfare.net/index.php/arrange-by-image/comment-page-1/#comment-457</link>
		<dc:creator>Joshua</dc:creator>
		<pubDate>Fri, 19 Feb 2010 22:36:17 +0000</pubDate>
		<guid isPermaLink="false">http://officewarfare.net/?page_id=178#comment-457</guid>
		<description>If Auto Arrange is turned on then it won&#039;t work.  The icons try to move but just flash.  We took your source code and added a function TurnOffAutoArrange that called right after TurnOffSnapToGrid.  It will check if autoarrange is turned on and turn it off if necessary.  The code can be cleaned up a bit as well.

private void TurnOffAutoArrange(HandleRef desktopReference)
{
// Get the style of the listview
int stylehandle;
stylehandle = GetWindowLong((IntPtr)desktopReference, GWL_STYLE);

// Check to see if auto arrange is on, if so turn off
if ((stylehandle &amp; LVS_AUTOARRANGE) == LVS_AUTOARRANGE)
{
IntPtr hparent = GetParent((IntPtr)desktopReference);

SendMessage(hparent, WM_COMMAND, IDM_TOGGLEAUTOARRANGE, 0);
}
}

This function uses the following signatures:
[DllImport(&quot;user32&quot;)]
public static extern int GetWindowLong(IntPtr hWnd, int nIndex);

[DllImport(&quot;user32&quot;)]
public static extern IntPtr GetParent(IntPtr hWnd);

[DllImport(&quot;user32.dll&quot;, CharSet = CharSet.Auto, SetLastError = false)]
static extern int SendMessage(IntPtr hWnd, int wMsg, int wParam, int lParam);

and the following constants:
const int LVS_AUTOARRANGE = 0x100;
const int IDM_TOGGLEAUTOARRANGE = 0x7051;
const int WM_COMMAND = 0x111;
const int GWL_STYLE = (-16);</description>
		<content:encoded><![CDATA[<p>If Auto Arrange is turned on then it won&#8217;t work.  The icons try to move but just flash.  We took your source code and added a function TurnOffAutoArrange that called right after TurnOffSnapToGrid.  It will check if autoarrange is turned on and turn it off if necessary.  The code can be cleaned up a bit as well.</p>
<p>private void TurnOffAutoArrange(HandleRef desktopReference)<br />
{<br />
// Get the style of the listview<br />
int stylehandle;<br />
stylehandle = GetWindowLong((IntPtr)desktopReference, GWL_STYLE);</p>
<p>// Check to see if auto arrange is on, if so turn off<br />
if ((stylehandle &amp; LVS_AUTOARRANGE) == LVS_AUTOARRANGE)<br />
{<br />
IntPtr hparent = GetParent((IntPtr)desktopReference);</p>
<p>SendMessage(hparent, WM_COMMAND, IDM_TOGGLEAUTOARRANGE, 0);<br />
}<br />
}</p>
<p>This function uses the following signatures:<br />
[DllImport("user32")]<br />
public static extern int GetWindowLong(IntPtr hWnd, int nIndex);</p>
<p>[DllImport("user32")]<br />
public static extern IntPtr GetParent(IntPtr hWnd);</p>
<p>[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]<br />
static extern int SendMessage(IntPtr hWnd, int wMsg, int wParam, int lParam);</p>
<p>and the following constants:<br />
const int LVS_AUTOARRANGE = 0&#215;100;<br />
const int IDM_TOGGLEAUTOARRANGE = 0&#215;7051;<br />
const int WM_COMMAND = 0&#215;111;<br />
const int GWL_STYLE = (-16);</p>
]]></content:encoded>
	</item>
</channel>
</rss>
