The Microsoft.SharePoint.WebControls.PeopleEditor control can be easily used in your web parts or other web based SharePoint solutions to provide a “People Picker” functionality. To find out how to use it see for example Ishai’s post here:
http://www.sharepoint-tips.com/2007/10/using-sharepoint-people-picker.html
However one of the things I needed to do was to use the control not just pick people but also to pick AD domain groups. This functionality is provided by the control but is not enabled by default when you create a new PeopleEditor class instance. In order to enable it you need to set the SelectionSet string property of the control to a comma separated list of the entities you want your people picker control to pick. Possible values are User for AD User, SecGroup for AD Group, DL for AD distribution list and SPGroup for a SharePoint group.
So if you want your people picker control to pick both AD users and AD groups you will need to set SelectionSet to “User,SecGroup” .