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 / samples4 / ch08 / frmxor.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-02-16  |  1.8 KB  |  55 lines

  1. VERSION 4.00
  2. Begin VB.Form frmXOR 
  3.    Caption         =   "XOR Drawing"
  4.    ClientHeight    =   4500
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1515
  7.    ClientWidth     =   6255
  8.    Height          =   4905
  9.    Left            =   1035
  10.    LinkTopic       =   "Form2"
  11.    ScaleHeight     =   4500
  12.    ScaleWidth      =   6255
  13.    Top             =   1170
  14.    Width           =   6375
  15.    Begin VB.PictureBox Picture1 
  16.       DrawMode        =   7  'Invert
  17.       ForeColor       =   &H000000FF&
  18.       Height          =   2895
  19.       Left            =   120
  20.       ScaleHeight     =   2865
  21.       ScaleWidth      =   5925
  22.       TabIndex        =   0
  23.       Top             =   60
  24.       Width           =   5955
  25.    End
  26.    Begin VB.Label Label1 
  27.       Caption         =   "Drag a window over the picture box and move it away. You should see some lines reappearing, and some vanishing."
  28.       Height          =   435
  29.       Left            =   120
  30.       TabIndex        =   2
  31.       Top             =   3900
  32.       Width           =   6015
  33.    End
  34.    Begin VB.Label lblText 
  35.       Caption         =   $"frmXOR.frx":0000
  36.       Height          =   795
  37.       Left            =   180
  38.       TabIndex        =   1
  39.       Top             =   3000
  40.       Width           =   5895
  41.    End
  42. Attribute VB_Name = "frmXOR"
  43. Attribute VB_Creatable = False
  44. Attribute VB_Exposed = False
  45. Option Explicit
  46. ' Copyright 
  47.  1997 by Desaware Inc. All Rights Reserved
  48. 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)
  49. Private Sub Picture1_Paint()
  50.     Dim dummy&
  51.     dummy& = Rectangle&(Picture1.hDC, 10, 10, 380, 180)
  52.     dummy& = Rectangle&(Picture1.hDC, 60, 60, 330, 130)
  53.     dummy& = Rectangle&(Picture1.hDC, 40, 40, 350, 150)
  54. End Sub
  55.