Visual Basic 2005 with .NET 3.0 Programmer's Reference
Drag and drop events and the clipboard both move data from a source to a destination. The source and destination can be in the same program or in two different applications.
The clipboard lets a program save and retrieve data in a central, shared location. Data copied to the clipboard may remain in the clipboard for a long time so that the user can paste it into another application later.
Drag and drop support lets the user directly copy or move date immediately. Once the operation is complete, the data is not left lying around as it is in the clipboard. A user who wants to copy the data again later must perform a new drag-and-drop operation.
Providing drag-and-drop support with appropriate feedback is more work than using the clipboard, but it provides the user with more direct control, and it doesn’t replace whatever data currently sits in the clipboard.
Together, these two tools let you provide the user with more control over the application’s data. They let the user move data between different parts of an application and between different applications. Although drag-and-drop support and the clipboard are usually not the main purpose of an application, they can add to the user’s experience an extra dimension of hands-on control.
The chapters in the book so far have focused on specific Visual Basic programming details. They explained the Visual Basic development environment, language syntax, standard controls and forms, custom controls, drag and drop, and the clipboard.
Chapter 14 examines applications at a slightly higher level in the context of the operating system. It explains the new User Account Control (UAC) security system provided by the Vista operating system and tells how UAC can prevent your application from running properly. Unless you understand how UAC works and how to interact with it, the operating system may not allow your program to perform the tasks that it should.
Категории