Nastavenφ barvy pixelu |
Postup: Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, _ ByVal y As Long) As Long Declare Function SetPixel Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, _ ByVal y As Long, ByVal crColor As Long) As Long Private Sub Form_Click() Dim x As Long, y As Long, h As Long h = Me.hdc ' ScaleMode formulß°e musφ b²t nastaven na 3 - Pixels For y = 0 To ScaleHeight - 1 For x = 0 To ScaleWidth - 1 If GetPixel(h, x, y) = vbRed Then SetPixel h, x, y, vbYellow End If Next Next End Sub |
Autor: The Bozena |