Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pixels values
is there a way to can get the color of a pixel in a picture?
in the form of ActiveSheet.Shapes(xxxxxx).?????????????? --- Is there a way to compare to pictures, only interested in whether it i a 100% match or no -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pixels values
You will not get this directly from normal VBA - or even Visual Basic, I
guess. However you may be successful using API functions via VBA. Have a look at this for starters. A very useful site. :- http://www.mentalis.org/apilist/GetPixel.shtml Here is some code which tells you what the current mouse position is (of course it depends on where the button is to run it.<<grin). This may save you having to check a few million pixels one by one. '----------------------------- '- Get mouse co-ordinates Type POINTAPI x As Long y As Long End Type Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long Dim z As POINTAPI '------------------------------ Sub Mouse_XY() GetCursorPos z MsgBox ("Mouse X : " & z.x & vbCr & "Mouse Y : " & z.y) End Sub '------------------------------------------------------ ' --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pixels | Excel Discussion (Misc queries) | |||
pixels | New Users to Excel | |||
Pixels are the new pies | Charts and Charting in Excel | |||
Size of column in pixels | Excel Discussion (Misc queries) | |||
some columns 30 characters 155 pixels others 310 pixels why | Excel Discussion (Misc queries) |