Setvirtualresolution(640,480) SetPrintSize(25) //Create a Quit Button if tested on an actual device. AddVirtualButton(1,580,400,80) SetVirtualButtonText(1,"QUIT") Repeat result=GetOrientation() select result case 1: print ( "portrait mode" ) endcase case 2: print ( "portrait mode - 180 degrees rotation" ) endcase case 3: print ( "landscape mode - 90 degrees counterclockwise" ) endcase case 4: print ( "landscape mode - 90 degrees clockwise" ) endcase endselect Sync() Until GetVirtualButtonPressed(1)=1 End