Hi, could anyone help me by explaining what Lib means i have come across these lines of code in a book and i could not understand what theses codes mean. Thx in advance

Private Declare Function GetPixel Lib "gdi32" _
  (ByVal hDC As Long, _
   ByVal x As Long, _
   ByVal y As Long) As Long

Recommended Answers

All 3 Replies

The first line means getting a function "GetPixel" from gdi32.dll

Forgot about the others.

yeah Lib means an external libary like a DLL

This is just the declaration of a windows API call. The library is gdi32 (usually found at c:\windows\system32\gdi32.dll) and contains a number of functions usable within your code. One of these functions is GetPixel, which returns the RGB colour value of the pixel found at point x and y of the object. hDc is a handle to the object (picture) which allows the operating system to identify it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.