MonoTouch: Auto scroll UITextField or other views hidden by keyboard

Here is a snippet that I use in my base view controller class to handle scrolling views that would be hidden by the keyboard when it appears. Any view within a UIScrollView can be made to scroll automatically to be visible when the keyboard appears over it.

This is based on the following Apple documentation example: Managing the Keyboard: Moving Content That Is Located Under the Keyboard.

Continue reading MonoTouch: Auto scroll UITextField or other views hidden by keyboard

C# – Screen capture and Overlays for Direct3D 9, 10 and 11 using API Hooks

So it’s been almost a year and I have finally got around to finishing a new version of my screen capture project that supports Direct3D 9, 10, and 11! This solution still uses SlimDX for the Direct3D API wrapper along with EasyHook to perform the remote process hooking and IPC between the host process and target process.

Some of the changes since the previous version:

  1. 100% C# implementation
  2. Added Direct3D 10 and 11 support
  3. Capturing multi-sampled/anti-aliased images (for 10 & 11) is supported
  4. Re-organised code making it easier to support multiple D3D versions
  5. Implemented a new and improved test bed application
  6. Provided example overlays for D3D 9 and 10
  7. Improved debug messaging from Target application to Host (mostly removed when compiled with “Release” configuration)

Update 2012-04-14: code now hosted on Github

Continue reading C# – Screen capture and Overlays for Direct3D 9, 10 and 11 using API Hooks

Where to download Tools/SDK/Developer Runtime for Silverlight 4.0.50524.0

This one is for anyone who has had to deal with Company Standard Operating Environments (SOE’s), and the red tape involved with deploying updates to applications such as Silverlight.

We have been working on a Silverlight 4 application, and along the way our development environment had its Silverlight Tools and Runtime updated to a more recent version than what the SOE machines are currently running. When we went to test the deployment, of course nothing worked.

“Ok that’s cool” we said, “we’ll just install the previous versions of the Developer Runtime, SDK and Tools”.

After a few frantic minutes of searching through hard drives, and our development installation area (where it SHOULD have been), we discovered that we didn’t have a copy of what we needed.

“Ok that’s also cool” we naively said, “we’ll just download them from Microsoft”.

Have you ever tried to search for the download anything other than the current version of an application from download.microsoft.com? We discovered today what a nightmare it can really be!

A good while later, after of trawling through blog posts and comments about how to downgrade and where to download, we finally found the following three working links for what we need to compile for Silverlight 4.0.50524.0.

Silverlight 4 Developer Runtime v4.0.50524.0:
http://download.microsoft.com/download/C/5/8/C5877489-8022-42A6-8456-D05C2A6C8DFB/runtime/Silverlight_Developer.exe

Silverlight 4 Tools for Visual Studio 2010 (SDK v4.0.50401.0) – (compatible with v4.0.50524.0):
http://download.microsoft.com/download/5/B/4/5B46BF8A-9350-49D5-B1E7-7789818FBF41/Silverlight4_Tools.exe

And the runtime version installed in the SOE (just in case you want to test your application before trying to deploy):

Silverlight 4 Runtime 4.0.50524.0:
http://download.microsoft.com/download/C/5/8/C5877489-8022-42A6-8456-D05C2A6C8DFB/runtime/Silverlight.exe

Here are the links to information that helped us find it all.

1) Developer Runtime was found here: Silverlight Release History http://www.microsoft.com/downloads/en/details.aspx?familyid=1B7A3205-B5F8-4E20-BF42-792DE5923454&displaylang=en

We then changed the link for the version we found from Silverlight_Developer.exe to Silverlight.exe to get the standard runtime release without debug information.

2) A post from Tim Heuer showed us that there was no updated Tools/SDK so the original final release of the SDK (v4.0.50401.0) would work fine http://timheuer.com/blog/archive/2010/06/03/silverlight-4-minor-update-june-2010.aspx. The link to the original Tools was then found in a blog comment somewhere – sorry I can’t remember where it is, and can’t see it in amongst the 20 odd Chrome windows + tabs open .

Time Heuer’s blog also had some helpful information on downgrading your Silverlight installation (e.g. uninstall the current SDK, reinstall the one you want and away you go).

I hope this saves someone a few minutes of their time!

C# – Screen capture with Direct3D 9 API Hooks

Since investigating screen capture techniques for Direct3D 9 applications a year ago I have wanted to look into hooking the Direct3D 9 API to utilise the much faster GetBackBuffer for my screen captures. Well here it is at last – a mostly managed C# solution providing easy and safe hooking of the Direct3D 9 API thanks to EasyHook, supporting both 32-bit and 64-bit.
Continue reading C# – Screen capture with Direct3D 9 API Hooks