Performing drag & drop operation in a Windows Forms app

In a Windows Forms application, a drag-and-drop functionality refers to the transferring of data with the mouse. It enables a user to drag data such as a text, an image, or other object with the mouse’s left-button from one control and drop it to another control. This functionality is an event-driven process that occurs when the data is copied from the source control and when the data is dropped onto the target control. The source as well as target control events are involved in implementing the drag-and-drop operations are as follows:

  • Source Control Events: These events occur when a mouse pointer triggers some action on a source control. The following are the source control events:

    . To get a glimpse of these PrepKits, you can download its free demo version (which contains 15 free practice questions) from:

    Download link: https://www.ucertify.com/exams/Microsoft/70-526-VB.html

    1. MouseDown Event: It occurs when the mouse button is pressed and the mouse pointer is over the source control. A method that handles this event calls the DoDragDrop method of the source control.
    2. GiveFeedback Event: It occurs when a drag-and-drop operation is initiated. The appearance of the mouse pointer can be modified by the source of a drag event. In this event, a user can obtain the visual feedback during the operation. This event provides a custom mouse pointer to a user.
    3. QueryContinueDrag Event: It occurs during a drag-and-drop operation. It is raised when the keyboard or the mouse button state changes during the operation. It also enables the drag source in order to determine whether the drag-and-drop operation is cancelled.
  • Target Control Events: These events occur when a mouse pointer triggers some action on a target control. The following are the source control events:
    1. DragEnter Event: It occurs when an object is dragged into the bounds of the target control. It is raised when the mouse cursor is first dragged over the target control during a drag-and-drop operation.
    2. DragOver Event: It occurs when an object is dragged over the bounds of the target control. It is raised when the mouse cursor is within the bounds of the control.
    3. DragDrop Event: It occurs when the mouse button is released over the target control and a drag-and-drop operation is completed.
    4. DragLeave Event: It occurs when the an object is dragged out of the bounds of the target control. It occurs when the current drag-and-drop operation is cancelled.

Sequence of a Drag-and-Drop Operation

The following is the general sequence of events that take place in a drag-and-drop operation:

  1. The drag-and-drop operation is initiated by calling the DoDragDrop method within the MouseDown event handler on the source control. The method contains two parameters, namely the Object data that specifies the desired data to pass and the DragDropEffects data value that specifies a particular drag operation on a control. The method determines under which control the current mouse cursor is located. It then checks whether the valid drop target operation has been performed. In this sequence, a new DataObject object is automatically created.
  2. The GiveFeedback event is raised when a custom mouse pointer is displayed during the dragging operation. The QueryContinueDrag event is raised to determine whether the drag operation should be continued or aborted.
  3. The drop-and-drop operation is allowed when the AllowDrop property is set to true in the Properties window at design time. The property can be set to true programmatically in the Form_Load event of a Windows form.
  4. The DragEnter event for a target control is raised when the mouse cursor is first dragged over the control. The DragOver event takes place when a mouse pointer stays over the bounds of a control.
  5. Finally, the DragDrop event is raised when the mouse button is released over a valid target control. In the Windows form, the event handler extracts the appropriate data from the DataObject object. Data is then displayed in the target control.

DragDropEffects Enumeration Values

The DragDropEffects enumeration identifies the effects of a drag-and-drop operation in a Windows Forms application. It contains the FlagsAttribute attribute that enables a user to perform a bitwise combination of its member values. It is used by the DragEventArgs, GiveFeedbackEventArgs, and Control classes. The following are the member values that can exist in this enumeration:

Member Values Description
All During a drag-and-drop operation data is copied, dragged, and removed from the source control. The data is then scrolled and dropped onto the target control.
Copy During a drag operation, data is copied to the target control.
Link During the operation, data from the source control is linked to the target control.
Move During the operation, data is moved from the source control to the target control.
None During a drag-and-drop operation, the target control does not accept the data from the source control.
Scroll During a drag-and-drop operation, the scrolling operation is initiated or is currently being performed.

Implementing Drag-and-Drop Operations between Applications

Generally, a drag-and-drop operation is performed within a single Windows Forms application. This operation can also be implemented between two applications. The following conditions should be fulfilled in order to enable a drag-and-drop operation between applications:

  • A target control should allow one of the drag effects being specified when the DoDragDrop method is called.
  • A target control should accept data in the same format that was set when the DoDragDrop method is called.

Implementing Drag-and-Drop Operations by using a TreeView Control

The implementation of a drag-and-drop operation in a TreeView control is slightly different from other controls. When a drag operation is initiated on a TreeView node, the ItemDrag event is raised. The event passes an instance of ItemDragEventArgs to a method that handles this event. The ItemDragEventArgs object contains a reference that is copied to the DataObject object in the DoDragDrop method.

Download link: https://www.ucertify.com/exams/Microsoft/70-526-VB.html

uCertify Launches Preparatory Exam Simulators for CompTIA A+ 2009 exams

uCertify (August 28, 2009) uCertify, a leading solution provider for IT certification exams, proudly announces the launch of PrepKit for the CompTIA A+ 2009 exams on August 24, 2009. The preparatory exam simulators for CompTIA A+ 2009 exams can be downloaded from the following links:

https://www.ucertify.com/exams/CompTIA/220-701.html

https://www.ucertify.com/exams/CompTIA/220-702.html

Pass in your first attempt, or we will refund your money

The demo versions collectively include sixty questions, related study notes, articles, and study tips for FREE. The full version of these PrepKits, which is available at an unbelievably low price, contains a total of 980 questions collectively. The A+ 2009 PrepKits also contains over 400 study notes, technical articles, and flashcards. These PrepKits are guaranteed to comprehensively cover all the objectives for the CompTIA A+ 2009 exams. These PrepKits come with a full 100% money back guarantee. You are guaranteed to pass in your first attempt, or we will refund your money. No questions asked!

uCertify is the first practice exam and IT training provider to launch its exam simulators for A+ 2009 kits within two weeks of launching the new version of A+ certification exams. uCertify is a leader in the certification business. Since its inception in 1996, uCertify has specialized in exam preparation solutions for various certification exams of Microsoft, Oracle,SUN, CompTIA, EC-Council, ADOBE, IBM, LPI. We are available 24 x 7.

On the launch of A+ 2009 PrepKits, Mark Smith, Director of Product Management, uCertify, remarked, “We provide quality-training products to help candidates pass their certification exams effortlessly. The new versions of the A+ certification exams will provide many challenges to the aspiring technicians. uCertify PrepKits for exam 220-701 and 220-702 covers all the objectives defined by CompTIA for A+ 2009 exams. These PrepKits provide realistic practice tests containing challenging questions with detailed explanations to help candidates understand the key concepts. Apart from practice questions, uCertify’s PrepKits also contain short tutorials, study notes, articles, exam tips, and How-tos. Comprehensive reporting tools also identify the candidate’s strengths, weaknesses, and opportunities for any improvement.”

To learn more about uCertify, visit us at https://www.ucertify.com or send us an email at sales@ucertify.com. We would be happy to explain how we can help you achieve your certification goals.

Sincerely,
Roger Stuart,
uCertify: https://www.ucertify.com
uCertify India: https://www.ucertify.com
uCertify PrepEngine: http://www.prepengine.com
Download link: https://www.ucertify.com/download.html

uCertify Simulation for CompTIA A+ 220-702 exam

uCertify (September 11, 2009) uCertify, a leading solution provider for IT certification exams, proudly announces the launch of PrepKit for the CompTIA A+ 2009 exam 220-702 A+ Practical Application on September 5, 2009. uCertify is the first vendor to launch their exam simulators for A+ 2009 kits within two weeks of the launch of the new version of A+ certification exams. The preparatory exam simulators for CompTIA A+ Practical Application exam 220-702 can be downloaded from the following link:

https://www.ucertify.com/exams/CompTIA/220-702.html

Continue reading “uCertify Simulation for CompTIA A+ 220-702 exam”

Microsoft Office SharePoint Practice Test

uCertify, a market leader in IT certification preparation software, today announces the launch of PrepKit for the exam 70-630- TS: Microsoft Office SharePoint Server 2007, Configuring. The PrepKit has been specially designed for aspirants who configure and deploy Office SharePoint Server 2007.

Candidates planning to take the exam 70-630: TS: Microsoft Office SharePoint Server 2007, Configuring should have minimum of one year of experience in configuring Microsoft Office SharePoint Server and related technologies.

The PrepKit has been developed by a team of knowledgeable and certified professionals. It contains interactive practice tests with over 250 challenging questions guaranteed to comprehensively cover all the objectives for the 70-630 exam with detailed analysis for each question, over 100 study notes, interactive quizzes, tips and technical articles. This uCertify PrepKit is a complete package, which not only makes you qualify the paper but also ensures that you adapt skills which can be practically used and implemented in your job.

Continue reading “Microsoft Office SharePoint Practice Test”

Appreciate a DBA’s role

Who is a DBA?

A Database Administrator (DBA) is a technical person who is responsible for the environmental aspects of a database. In general, these include the following database aspects:

  • Recoverability
  • Integrity
  • Security
  • Availibilty
  • Performance
  • Development and testing support

In other words, a DBA is a person who is responsible for designing, developing and implementing programs, as required, to support the technical capabilities in a database environment.

Pass the following certifications using uCertify PrepKits:

Continue reading “Appreciate a DBA’s role”