home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / ch_code / ch04 / dropform / dropf2.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-04-13  |  1.6 KB  |  53 lines

  1. VERSION 5.00
  2. Begin VB.Form DropForm2 
  3.    Caption         =   "STATES"
  4.    ClientHeight    =   3225
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   2820
  8.    LinkTopic       =   "Form2"
  9.    ScaleHeight     =   3225
  10.    ScaleWidth      =   2820
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.ListBox List1 
  13.       Height          =   2595
  14.       Left            =   120
  15.       TabIndex        =   0
  16.       Top             =   480
  17.       Width           =   2535
  18.    End
  19.    Begin VB.Label Label1 
  20.       Caption         =   "Drop States in this ListBox"
  21.       BeginProperty Font 
  22.          Name            =   "Tahoma"
  23.          Size            =   9.75
  24.          Charset         =   0
  25.          Weight          =   400
  26.          Underline       =   0   'False
  27.          Italic          =   0   'False
  28.          Strikethrough   =   0   'False
  29.       EndProperty
  30.       Height          =   255
  31.       Left            =   120
  32.       TabIndex        =   1
  33.       Top             =   120
  34.       Width           =   2535
  35.    End
  36. Attribute VB_Name = "DropForm2"
  37. Attribute VB_GlobalNameSpace = False
  38. Attribute VB_Creatable = False
  39. Attribute VB_PredeclaredId = True
  40. Attribute VB_Exposed = False
  41. Private Sub List1_DragDrop(Source As Control, X As Single, Y As Single)
  42.     If Source.Caption = "********" Then
  43.         Beep
  44.         Exit Sub
  45.     End If
  46.     If Source.Tag = "STATE" Then
  47.         List1.AddItem Source.Caption & "  (" & Source.Parent.Name & ")"
  48.         Source.Caption = "********"
  49.     Else
  50.         MsgBox "This list accepts states only!"
  51.     End If
  52. End Sub
  53.