home *** CD-ROM | disk | FTP | other *** search
/ Dan Appleman's Visual Bas…s Guide to the Win32 API / Dan.Applmans.Visual.Basic.5.0.Programmers.Guide.To.The.Win32.API.1997.Ziff-Davis.Press.CD / VB5PG32.mdf / vbpg32 / samples5 / ch08 / frmxor.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-11-27  |  1.7 KB  |  52 lines

  1. VERSION 5.00
  2. Begin VB.Form frmXOR 
  3.    Caption         =   "XOR Drawing"
  4.    ClientHeight    =   4500
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1515
  7.    ClientWidth     =   6255
  8.    LinkTopic       =   "Form2"
  9.    PaletteMode     =   1  'UseZOrder
  10.    ScaleHeight     =   4500
  11.    ScaleWidth      =   6255
  12.    Begin VB.PictureBox Picture1 
  13.       DrawMode        =   7  'Invert
  14.       ForeColor       =   &H000000FF&
  15.       Height          =   2895
  16.       Left            =   120
  17.       ScaleHeight     =   2865
  18.       ScaleWidth      =   5925
  19.       TabIndex        =   0
  20.       Top             =   60
  21.       Width           =   5955
  22.    End
  23.    Begin VB.Label Label1 
  24.       Caption         =   "Drag a window over the picture box and move it away. You should see some lines reappearing, and some vanishing."
  25.       Height          =   435
  26.       Left            =   120
  27.       TabIndex        =   2
  28.       Top             =   3900
  29.       Width           =   6015
  30.    End
  31.    Begin VB.Label lblText 
  32.       Caption         =   $"frmXOR.frx":0000
  33.       Height          =   795
  34.       Left            =   180
  35.       TabIndex        =   1
  36.       Top             =   3000
  37.       Width           =   5895
  38.    End
  39. Attribute VB_Name = "frmXOR"
  40. Attribute VB_GlobalNameSpace = False
  41. Attribute VB_Creatable = False
  42. Attribute VB_PredeclaredId = True
  43. Attribute VB_Exposed = False
  44. Option Explicit
  45. Private Declare Function Rectangle& Lib "gdi32" (ByVal hDC As Long, ByVal x1 As Long, ByVal y1 As Long, ByVal x2 As Long, ByVal y2 As Long)
  46. Private Sub Picture1_Paint()
  47.     Dim dummy&
  48.     dummy& = Rectangle&(Picture1.hDC, 10, 10, 380, 180)
  49.     dummy& = Rectangle&(Picture1.hDC, 60, 60, 330, 130)
  50.     dummy& = Rectangle&(Picture1.hDC, 40, 40, 350, 150)
  51. End Sub
  52.