home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmGrayString
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "GrayStringProc"
- ClientHeight = 885
- ClientLeft = 1575
- ClientTop = 1845
- ClientWidth = 3285
- Height = 1290
- Left = 1515
- LinkTopic = "Form1"
- ScaleHeight = 59
- ScaleMode = 3 'Pixel
- ScaleWidth = 219
- Top = 1500
- Width = 3405
- Begin CheckBox Check1
- BackColor = &H00C0C0C0&
- Caption = "Grayed"
- Height = 255
- Left = 60
- TabIndex = 1
- Top = 480
- Width = 1455
- End
- Begin PictureBox GrayPhone
- AutoRedraw = -1 'True
- AutoSize = -1 'True
- BorderStyle = 0 'None
- Height = 345
- Left = 600
- Picture = GRAYSTRI.FRX:0000
- ScaleHeight = 23
- ScaleMode = 3 'Pixel
- ScaleWidth = 117
- TabIndex = 0
- Top = 60
- Visible = 0 'False
- Width = 1755
- End
- Begin CBVBX ctlGrayString
- CBType = 7 ' 7 - GrayStringProc
- Left = 0
- Top = 0
- End
- Option Explicit
- Dim gray&
- Sub Check1_Click ()
- gray = Check1.Value
- Me.Refresh
- End Sub
- Sub ctlGrayString_GrayStringProc (hDC As Integer, lpdata As Long, cch As Integer, retval As Integer)
- Dim success%
- success% = BitBlt(hDC, 0, 0, GrayPhone.Width, GrayPhone.Width, GrayPhone.hDC, 0, 0, SRCCOPY)
- retval = CInt(lpdata)
- End Sub
- Sub Form_Paint ()
- Dim success%
- Dim hbr%
- hbr = CreateSolidBrush(ByVal RGB(0, 0, 255))
- success% = GrayString%(Me.hDC, hbr, ctlGrayString.CBAdress, gray, -1, 0, 0, GrayPhone.Width, GrayPhone.Height)
- End Sub
-