home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 5 / MasteringVisualBasic5.iso / ch_code / ch04 / drpevnts / dropform.frm (.txt) next >
Encoding:
Visual Basic Form  |  1997-02-20  |  2.5 KB  |  79 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   3255
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   6000
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   3255
  10.    ScaleWidth      =   6000
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.TextBox Text1 
  13.       DragMode        =   1  'Automatic
  14.       BeginProperty Font 
  15.          Name            =   "MS Sans Serif"
  16.          Size            =   9.75
  17.          Charset         =   0
  18.          Weight          =   400
  19.          Underline       =   0   'False
  20.          Italic          =   0   'False
  21.          Strikethrough   =   0   'False
  22.       EndProperty
  23.       Height          =   420
  24.       Left            =   2985
  25.       TabIndex        =   2
  26.       Text            =   "Enter some text and drag it"
  27.       Top             =   2625
  28.       Width           =   2775
  29.    End
  30.    Begin VB.CommandButton Command1 
  31.       Caption         =   "Drag this button"
  32.       DragMode        =   1  'Automatic
  33.       BeginProperty Font 
  34.          Name            =   "MS Sans Serif"
  35.          Size            =   9.75
  36.          Charset         =   0
  37.          Weight          =   400
  38.          Underline       =   0   'False
  39.          Italic          =   0   'False
  40.          Strikethrough   =   0   'False
  41.       EndProperty
  42.       Height          =   435
  43.       Left            =   150
  44.       TabIndex        =   1
  45.       Top             =   2625
  46.       Width           =   1665
  47.    End
  48.    Begin VB.PictureBox Picture1 
  49.       BackColor       =   &H0000FF00&
  50.       Height          =   2175
  51.       Left            =   75
  52.       ScaleHeight     =   2115
  53.       ScaleWidth      =   3855
  54.       TabIndex        =   0
  55.       Top             =   120
  56.       Width           =   3915
  57.    End
  58. Attribute VB_Name = "Form1"
  59. Attribute VB_GlobalNameSpace = False
  60. Attribute VB_Creatable = False
  61. Attribute VB_PredeclaredId = True
  62. Attribute VB_Exposed = False
  63. Option Explicit
  64. Private Sub Command1_Click()
  65.     Debug.Print "I was clicked"
  66. End Sub
  67. Private Sub Picture1_DragDrop(Source As Control, X As Single, Y As Single)
  68.     Picture1.BackColor = vbBlue
  69. End Sub
  70. Private Sub Picture1_DragOver(Source As Control, X As Single, Y As Single, State As Integer)
  71.     If State = 0 Then Picture1.BackColor = vbRed
  72.     If State = 2 Then Form1.Caption = "Source Control moves over the PictureBox"
  73.     If State = 1 Then
  74.         Picture1.BackColor = vbGreen
  75.         Form1.Caption = "Drag & Drop Demo"
  76.     End If
  77.         
  78. End Sub
  79.