Updating finally
Posted by Jeffrey Vanneste at 12:43 PM on November 13, 2004
Category:
Blogging
I finally got around to updating my blog. I updated the Contact page and 2 of the projects I was working on. The new Bunnyhug Software game I'm working on doesn't have any information really but the PHP based Carcassonne game has a screenshot and the current project status. |
Ipod and Bloglines
Posted by Jeffrey Vanneste at 08:31 AM on November 12, 2004
Category:
Toys
I just bought an Ipod Mini for my girlfriend. In the process of looking for useful tools I found a neat perl script that copies all unread feeds to your Ipod. Being that I've never ran any perl scripts on my windows PC before this is what you need to do to get the bloglines script to work. 1) The bloglines perl script. Get it here. Doesn't matter where you put this. You will need to edit it to contain your bloglines user ID, password and the drive your Ipod is mounted to. 2) Active State perl. This will allow you to run perl scripts on your Windows computer. Get it here 3) WebService-Bloglines module for perl. This needs to be extracted into your active state perl lib directory. If you installed Active State Perl into C:\perl it would create c:\perl\lib\WebService\Bloglines 4) XML-Rss module for perl. Just download the source from here and save the .pm file in your C:\perl\lib\XML folder. That's it. You should now be able to double-click the bloglines perl script and it will sync feeds to your Ipod's notes folder. |
Focus() not working?
Posted by Jeffrey Vanneste at 03:33 PM on November 01, 2004
Category:
Development
We had this strange problem at work today where we would give focus to a TextBox by calling the Focus() method and for some reason the TextBox got focus but yet the cursor was still not on the TextBox. How do we know it had focus? Well, we would press tab and the next button in the tab order got focus. Pressing shift+tab hid the focus again but pressing shift+tab one more time and we would end up on the control before the TextBox. SendMessage(this.textBox.Handle, Win32.WM_LBUTTONDOWN, 0, 0); SendMessage(this.textBox.Handle, Win32.WM_LBUTTONUP, 0, 0); My other discovery today was that I don't need to use Win32 imports to send Shift+Tab keyboard strokes like this: byte[] pbKeyState = new byte[256]; Win32.GetKeyboardState(pbKeyState); pbKeyState[(int)Win32.VK.SHIFT] |= 0x80; Win32.SetKeyboardState(pbKeyState); Win32.PostMessage( this.Handle, Win32.WM_KEYDOWN, (System.UInt32)Win32.VK.TAB, 0); Win32.PostMessage( this.Handle, Win32.WM_KEYUP, (System.UInt32)Win32.VK.TAB, 0); System.Windows.Forms.Application.DoEvents(); Win32.GetKeyboardState(pbKeyState); pbKeyState[(int)Win32.VK.SHIFT] ^= 0x80; Win32.SetKeyboardState(pbKeyState); It's so much easier to just do it like this:
System.Windows.Forms.SendKeys.Send("+{TAB}");
Silly me :) And one final note, pinvoke.net is an absolutely fabulous site for finding different Win32 structures and imports for use with .NET. |
