This is only working with some types of controls. I can paste
togglebuttons into the groupbox, but command buttons always end up
pasted to the main form. More seriously, any togglebuttons that I
paste loose the OnClick event which I'm using.
Command buttons can't (as far as I know) be assigned to a groupbox. If you
go through the Groupbox wizard, you'll see what controls can be used.
It's a common problem that when a control is cut and then pasted, it
sometimes loses the connection with existing events. You'll just need to go
back to the control's Even properties tab and specify the event again, and
it will then re-connect to the existing code.
Carl Rapson