home *** CD-ROM | disk | FTP | other *** search
/ The Mother of All Windows Books / CD-MOM.iso / cd_mom / newsletr / vbz / vbz1-3 / popclr.bas < prev    next >
BASIC Source File  |  1993-04-25  |  454b  |  22 lines

  1. DefInt A-Z
  2.  
  3. Declare Function GetAsyncKeyState Lib "User" (ByVal VKCODE)
  4.  
  5.  
  6. Const VK_CONTROL = &H11
  7. Const VK_C = 67
  8.  
  9. Sub Main ()
  10.     Clr& = 0
  11.     Do
  12.         Do
  13.             Ok = DoEvents()
  14.         Loop Until GetAsyncKeyState(VK_C) And &H8000
  15.         If GetAsyncKeyState(VK_CONTROL) And &H8000 Then
  16.             Result = GetColors(Clr&, -1)
  17.             If Result Then SendKeys "&H" + Hex$(Clr&) + "&~", 0
  18.         End If
  19.     Loop
  20. End Sub
  21.  
  22.