DoDragDrop is Synchronous

5 Comments »

The DoDragDrop method on a control is synchronous. This means that when you call DoDragDrop to start a drag operation, the program will not return and execute the rest of your handler code until the user 1) drops the data she is dragging, or 2) cancels the drag operation. This is one of those little facts that you need to file away in your brain, as it could have a profound effect on your drag & drop logic.

Read the rest of this entry »

Prevent Beep for TextBox Enter

4 Comments »

Typically when you press the Enter key while typing in a TextBox control, you will hear the computer beep.

To prevent this beep, handle the Enter key in the KeyPress event, and set the Handled property to true. For example:

Read the rest of this entry »

« go back