home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmCombine
- Caption = "Combined Region"
- ClientHeight = 3735
- ClientLeft = 1500
- ClientTop = 3465
- ClientWidth = 6870
- LinkTopic = "Form2"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 249
- ScaleMode = 3 'Pixel
- ScaleWidth = 458
- Begin VB.PictureBox picCombined
- FillColor = &H0000FFFF&
- FillStyle = 0 'Solid
- ForeColor = &H00FF00FF&
- Height = 3015
- Left = 60
- ScaleHeight = 199
- ScaleMode = 3 'Pixel
- ScaleWidth = 444
- TabIndex = 1
- Top = 60
- Width = 6690
- Begin VB.Label Label1
- Caption = "PolyPolygonal Region:"
- Height = 195
- Left = 180
- TabIndex = 6
- Top = 1320
- Width = 1695
- End
- Begin VB.Label lblRoundRect
- Caption = "Round Rectangular:"
- Height = 195
- Left = 4500
- TabIndex = 5
- Top = 60
- Width = 1515
- End
- Begin VB.Label lblPolygon
- Caption = "Polygon:"
- Height = 195
- Left = 3120
- TabIndex = 4
- Top = 60
- Width = 1275
- End
- Begin VB.Label lblElliptic
- Caption = "Elliptic:"
- Height = 195
- Left = 1680
- TabIndex = 3
- Top = 60
- Width = 855
- End
- Begin VB.Label lblRect
- Caption = "Rectangular:"
- Height = 195
- Left = 180
- TabIndex = 2
- Top = 60
- Width = 1035
- End
- End
- Begin VB.CommandButton cmdExit
- Cancel = -1 'True
- Caption = "E&xit"
- Default = -1 'True
- Height = 555
- Left = 5460
- TabIndex = 0
- Top = 3120
- Width = 1335
- End
- Attribute VB_Name = "frmCombine"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- ' Copyright
- 1997 by Desaware Inc. All Rights Reserved
- Dim fClip As Integer, dl
- Dim hCombinedRegion As Long
- Public Sub Initialize(CmdButton As Integer, useRegion As Long)
- Select Case CmdButton
- Case 0
- fClip = False
- Case 1
- fClip = True
- End Select
- ' Don't delete this copy - it's owned by the other form.
- hCombinedRegion = useRegion
- Me.Show 1
- End Sub
- Private Sub cmdExit_Click()
- Unload Me
- End Sub
- Private Sub picCombined_Paint()
- Dim savedDC, i%
- If Not fClip Then
- picCombined.FillColor = QBColor(13) 'Magenta
- dl = PaintRgn(picCombined.hDC, hCombinedRegion)
- Else
- savedDC = SaveDC(picCombined.hDC)
- dl = SelectClipRgn(picCombined.hDC, hCombinedRegion)
- picCombined.ForeColor = QBColor(13)
- ' Draw a bunch of horizontal lines to illustrate clipping
- For i% = 1 To 300 Step 2
- picCombined.Line (0, i%)-(500, i%)
- Next i%
- picCombined.ForeColor = QBColor(0)
- dl = RestoreDC(picCombined.hDC, savedDC)
- End If
- End Sub
-