This paper describes a design and implementation of a new handheld user interface framework called HIVE. HIVE provides the familiar 2D user interface on a mobile handheld computer to support user interactions in a virtual environment. It provides a scripting language based on XML and Lua to ease the development of handheld user interfaces and to increase the reusability of the interface components. This paper also discusses the use of the HIVE framework to develop a couple of handheld user interface applications for virtual environments to show usability.