Create a form that contains text boxes, combo boxes, list boxes, and pictures boxes (however many you want, but at least one of each). Add a menu structure as follows:
Cut should be associated with CTRL-X
, Copy with CTRL-C
, and Paste with CTRL-V
.
Write the code for the Cut, Copy, and Paste selections, so that they work as expected. You'll have to use the TypeOf
operator with Screen.ActiveControl
, as shown below:
If TypeOf Screen.ActiveControl Is TextBox Then Clipboard.SetText Screen.ActiveControl.SelText ElseIf TypeOf Screen.ActiveControl Is ComboBox Then Clipboard.SetText Screen.ActiveControl.Text End If |
You'll have to fill it in for PictureBox
and ListBox
, and figure out exactly how each routine is organized.
Extra Improvements: