ex.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
DragDrop Event and IF TYPEOF Statement Example
                        Example                Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
' This example demonstrates a visual effect of dropping a picture box into
' another picture box using the DragDrop event and the IF...TYPEOF statement.
 
' To try this example:
' 1. Choose New Project from the File menu
' 2. Choose New Form from the File menu to create a form with two picture
'    boxes
' 3. Set the properties of Picture1 as follows:
'    DragMode = 1 - Automatic, and BackColor = 2 - Green
' 4. Press Alt+F4 to return to the programming environment
' 5. Copy the code example below to the form module
' 6. Press F5 to run the example
 
 ' Set Picture2 backcolor to that of Source control (Picture1).
 SUB Picture2_DragDrop (Source AS CONTROL, X AS SINGLE, Y AS SINGLE)
     IF TYPEOF Source IS PictureBox THEN
          Picture2.BackColor = Source.BackColor
     END IF
 END SUB