Archive for the 'News' Category

Update to ArrangeByImage

June 01st, 2009 | Category: Coding, News, Offense, Tool

As I attempted to anoy those around me with ArrangeByImage today I realized one major flaw.  The original (now updated) code did nothing about the align to grid option on the desktop.  I fiddled a bit and found the style that sets that on the desktop and I am now removing “Align To Grid” when you run the program.  And in the interest of saving others the effort to find out how this is done here is a code snippet in c# / Win32API. Note this will actually work for any listview which is technically what the desktop is.

        [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
        static extern IntPtr SendMessage(HandleRef hWnd, uint Msg, IntPtr wParam, IntPtr lParam);

        [DllImport("user32.dll", SetLastError = true)]
        static extern IntPtr FindWindow(string lpszClass, string lpszWindow);

        [DllImport("user32.dll", SetLastError = true)]
        static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);

        const uint LVM_SETEXTENDEDLISTVIEWSTYLE = 4150;
        const uint LVM_GETEXTENDEDLISTVIEWSTYLE = 4151;
        const uint LVS_EX_SNAPTOGRID = 524288;

        private void turnOffSnapToGrid()
        {
            IntPtr programmanagerWindow = FindWindow(null, "Program Manager");
            IntPtr desktopWindow = FindWindowEx(programmanagerWindow, IntPtr.Zero, "SHELLDLL_DefView", null);
            IntPtr listviewWindow = FindWindowEx(desktopWindow, IntPtr.Zero, "SysListView32", null);
            HandleRef desktopReference = new HandleRef(null, listviewWindow);

            int CurrentSettings = (int) SendMessage(desktopReference, LVM_GETEXTENDEDLISTVIEWSTYLE, IntPtr.Zero, IntPtr.Zero);
            IntPtr ptr = new IntPtr(CurrentSettings & ~LVS_EX_SNAPTOGRID);
            SendMessage(desktopReference, LVM_SETEXTENDEDLISTVIEWSTYLE, IntPtr.Zero, ptr);
        }
No comments

Updated ArrangeByImage

May 30th, 2009 | Category: Funny, News, Offense, Tool

Made an update to ArrangeByImage so it now supports command line switches. This is in keeping with the general purpose of this site which is to annoy your co-workers. Now you can run ArrangeByIcon on a friends computer and watch their confused face. Have Fun!

No comments

Arrange By Image

May 30th, 2009 | Category: Funny, News, Tool

New app released, ArrangeByImage.  My co-worker Mike and I modified some code he found and came up with this.  Check out the link for full back story, screen shots,  and the app with source code.   ArrangeByImage allows you to arrange the icons on your desktop based on the black lines in a bitmap image.

No comments

Broken Tip Line

May 18th, 2008 | Category: News

Just found out that my tips line has not been working.  If anyone wants to send in a tip try josh@officewarfare.net instead.  Not sure if anyone has tried sending them in but if you did, please resend it because I do intend to do my best to implement and post stuff sent in.  Sorry for the inconvenience.

No comments

Adding some pages

May 07th, 2008 | Category: News

So I realize that sometimes a blog format is not exactly what is needed for a site of this nature.  Because of that I am starting to move some of the content, once it has been added, to pages like the Downloads page you see in the upper right corner of the screen.  That way you can get to some of the more useful content without having to search through months of blog entries.  i am going to work on doing the same with some of the tutorials I have written. 

Hopefully that will shape up in the next few days. Also remember that if you have any ideas or requests send them to the tip line at tips@officewarfare.net.  That way I can keep providing you all interesting content.

No comments

« Previous PageNext Page »