Not sure if I'm off track here but when you say "using the home button" how do you mean? I ask because you can't "hit" the screen home button from code (like you can with say cycle-start with doOEMButton etc.). The home BUTTON (on the standard screen anyway) is just a script and doesn't have an OEM code. If you want to home C from code you'd just do a doOEMButton(1027).
Sorry, by hit the home button i mean DoOEMButton(1027), that is essentially hitting a button. It is not allowed when you're running a program. Does work in the MDI mode. Trying to find a work around.