home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmCopy
- Caption = "COPY Pen drawing"
- ClientHeight = 4755
- ClientLeft = 1095
- ClientTop = 1515
- ClientWidth = 6195
- LinkTopic = "Form2"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 4755
- ScaleWidth = 6195
- Begin VB.PictureBox Picture1
- DrawMode = 7 'Invert
- ForeColor = &H000000FF&
- Height = 2895
- Left = 120
- ScaleHeight = 2865
- ScaleWidth = 5925
- TabIndex = 0
- Top = 60
- Width = 5955
- End
- Begin VB.Label Label2
- Caption = "Note: The forecolor on this picturebox is the same as on the other form. The xor drawing mode makes it look different."
- Height = 375
- Left = 120
- TabIndex = 3
- Top = 4260
- Width = 6015
- End
- Begin VB.Label Label1
- Caption = "Drag a window over this form. The lines should appear the same. "
- Height = 255
- Left = 120
- TabIndex = 2
- Top = 3900
- Width = 5955
- End
- Begin VB.Label lblText
- Caption = $"frmCopy.frx":0000
- Height = 795
- Left = 180
- TabIndex = 1
- Top = 3000
- Width = 5895
- End
- Attribute VB_Name = "frmCopy"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- 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)
- Private Sub Picture1_Paint()
- Dim dummy&
- Picture1.DrawMode = 13 ' Copy pen
- dummy& = Rectangle&(Picture1.hDC, 10, 10, 380, 180)
- dummy& = Rectangle&(Picture1.hDC, 60, 60, 330, 130)
- dummy& = Rectangle&(Picture1.hDC, 40, 40, 350, 150)
- Picture1.DrawMode = 7 'xor
- End Sub
-