Dim PathTOPic As String Dim MyColor As Long, R As Integer, G As Integer, B As Integer, Temp As Long Me.Visible = True DoEvents PathTOPic = "C:\z\pb\1.jpg" Picture1.Picture = LoadPicture(PathTOPic) Picture1.AutoRedraw = True MyColor = Picture1.Point(10, 10) Debug.Print MyColor Temp = MyColor Mod 65536 MyColor = MyColor - Temp B = MyColor / 65536 MyColor = Temp Temp = MyColor Mod 256 MyColor = MyColor - Temp G = MyColor / 256 R = Temp Debug.Print R, G, B Debug.Print RGB(R, G, B)
However you will have to change the PathTOPic to your path to a picture. Good Luck
|