home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD173623202001.psc / ApiMod.bas next >
Encoding:
BASIC Source File  |  2001-03-10  |  3.8 KB  |  67 lines

  1. Attribute VB_Name = "ApiMod"
  2. Option Explicit
  3.  
  4. Public Type RECT
  5.    Left As Long
  6.    Top As Long
  7.    Right As Long
  8.    Bottom As Long
  9. End Type
  10.  
  11. Public Type POINTAPI
  12.    x As Long
  13.    y As Long
  14. End Type
  15.  
  16. Public Type Msg
  17.     hWnd As Long
  18.     Message As Long
  19.     wParam As Long
  20.     lParam As Long
  21.     time As Long
  22.     pt As POINTAPI
  23. End Type
  24.  
  25. Public Const SYSTEM_FONT = 13
  26. Public Const DT_CENTER = &H1
  27. Public Const WM_MOUSEFIRST = &H200
  28. Public Const WM_MOUSELAST = &H209
  29. Public Const MK_LBUTTON = &H1
  30. Public Const MK_RBUTTON = &H2
  31. Public Const MK_SHIFT = &H4
  32. Public Const MK_CONTROL = &H8
  33. Public Const MK_MBUTTON = &H10
  34. Public Const HTCAPTION = 2
  35. Public Const WM_NCLBUTTONDOWN = &HA1
  36. Public Const COLOR_BTNFACE = 15
  37. Public Const COLOR_BTNSHADOW = 16
  38. Public Const COLOR_BTNHIGHLIGHT = 20
  39.  
  40. Public Declare Function CreateCompatibleDC Lib "gdi32" (ByVal hDC As Long) As Long
  41. Public Declare Function CreatePen Lib "gdi32" (ByVal nPenStyle As Long, ByVal nWidth As Long, ByVal nColor As Long) As Long
  42. Public Declare Function SelectObject Lib "gdi32" (ByVal hDC As Long, ByVal hObject As Long) As Long
  43. Public Declare Function CreateCompatibleBitmap Lib "gdi32" (ByVal hDC As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
  44. Public Declare Function DeleteDC Lib "gdi32" (ByVal hDC As Long) As Long
  45. Public Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
  46. Public Declare Function StretchBlt Lib "gdi32" (ByVal hDCDest As Long, ByVal XDest As Long, ByVal YDest As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hDCSrc As Long, ByVal nXSrc As Long, ByVal nYSrc As Long, ByVal SourceWidth As Long, ByVal SourceHeight As Long, ByVal dwRop As Long) As Long
  47. Public Declare Function BitBlt Lib "gdi32" (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
  48. Public Declare Function FillRect Lib "user32" (ByVal hDC As Long, lpRect As RECT, ByVal hBrush As Long) As Long
  49. Public Declare Function GetStockObject Lib "gdi32" (ByVal nIndex As Long) As Long
  50. Public Declare Function SetBkColor Lib "gdi32" (ByVal hDC As Long, ByVal crColor As Long) As Long
  51. Public Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As Long
  52. Public Declare Function GetPixel Lib "gdi32" (ByVal hDC As Long, ByVal x As Long, ByVal y As Long) As Long
  53. Public Declare Function LineTo Lib "gdi32" (ByVal hDC As Long, ByVal x As Long, ByVal y As Long) As Long
  54. Public Declare Function ReleaseCapture Lib "user32" () As Long
  55. Public Declare Function GetWindowDC Lib "user32" (ByVal hWnd As Long) As Long
  56. Public Declare Function ReleaseDC Lib "user32" (ByVal hWnd As Long, ByVal hDC As Long) As Long
  57. Public Declare Function GetDesktopWindow Lib "user32" () As Long
  58. Public Declare Function GetDC Lib "user32" (ByVal hWnd As Long) As Long
  59. Public Declare Function DrawText& Lib "user32" Alias "DrawTextA" (ByVal hDC As Long, ByVal lpStr As String, ByVal nCount As Long, lpRect As RECT, ByVal wFormat As Long)
  60. Public Declare Function GetMessage Lib "user32" Alias "GetMessageA" (lpMsg As Msg, ByVal hWnd As Long, ByVal wMsgFilterMin As Long, ByVal wMsgFilterMax As Long) As Long
  61. Public Declare Function DispatchMessage Lib "user32" Alias "DispatchMessageA" (lpMsg As Msg) As Long
  62. Public Declare Function TranslateMessage Lib "user32" (lpMsg As Msg) As Long
  63. Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
  64. Public Declare Function GetSysColor Lib "user32" (ByVal nIndex As Long) As Long
  65. Public Declare Function GetBkColor Lib "gdi32" (ByVal hDC As Long) As Long
  66. Public Declare Function SetTextColor Lib "gdi32" (ByVal hDC As Long, ByVal crColor As Long) As Long
  67.