• Use MS Paint to make a black box (100x100) with a small green circle in the middle. Then load the picture in a PictureBox on the Form.
  • Put this code in a module

    Code:
    Declare Function BitBlt Lib "gdi32" Alias "BitBlt" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
  • Make sure all Controls have their SclaeMode set to Pixel
  • Put this code in a Commandbutton

    Code:
    Private Sub Command1_Click()
    
       ' Copy all colours but Black. The SRCAND is what doesn't
       ' Copy the black. If you use SRCPAINT, it will not copy
       ' the white.
       status = BitBlt(Form1.hDC, 0, 0, 100, 100, Pciture1.hDC, 0, 0, SRCAND)
    
    End Sub


This should work.