170 likes | 316 Views
Menu & Clipboard. Menu Cut / Copy / Paste. Menus. Created in the Menu Editor Can contain menu titles, menu items, separator bars, submenu titles, and submenu items To avoid confusion, it is best to use one level of menus. Menu Elements in User Interface. Menu Elements in Menu Editor.
E N D
Menu & Clipboard Menu Cut / Copy / Paste
Menus • Created in the Menu Editor • Can contain menu titles, menu items, separator bars, submenu titles, and submenu items • To avoid confusion, it is best to use one level of menus
Access Keys • Assign to each menu title and each menu item • Must be unique within a menu • Menu titles are accessed by pressing the Alt key and the access key • Menu items are accessed by pressing the access key when the menu is open
Shortcut Keys • Assign to commonly used menu commands • Displayed to the right of the menu item • Can be used only when the menu is closed
More on Menu Controls • You must provide a name and a caption for each menu control • Each menu title and each menu item is considered a separate control and it can have its own code • A menu control can recognize only the Click event
Separator Bar • A separator bar is a horizontal line used to separate two groups of menu items • Created by entering a hyphen in the menu control’s Caption property • Even separator bars must have a name
Clipboard Object • Provides access to the Windows clipboard • Allows you to include cut, copy, and paste capabilities in your application
Methods of the Clipboard Object • SetText method • sends text to the clipboard • Clipboard.SetTextdata • GetText() method • retrieves text from the clipboard • Clipboard.GetText() • Clear method • clears the contents of the clipboard • object.Clear
SelText Property • When a user selects text in a text box, Visual Basic records the text in the text box’s SelText property • This property contains a zero-length string if no text is selected • You also can use the SelLength property to determine if any text is selected in the text box