Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact
A1VBCode Forums
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      

Home » Classic Visual Basic (VB 6 or earlier) » API » RGB value

13 posts, Page 2 of 2. ««12

RGB valueExpand / Collapse
Author
Message
Posted 10/8/2008 3:10:06 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 11/4/2008 3:13:46 PM
Posts: 8, Visits: 14
I'm sorry, i'm not increase it. I just not tell completely and specifics.

I search on vbforums, but i can't found any thread that same or similar with my problem. Could you tell me which thread link on vbforums that same with my problem ?

Please, help me... THanks. GBU.

Post #25940
Posted 10/8/2008 4:11:48 PM


Forum God

Forum GodForum GodForum GodForum GodForum GodForum GodForum GodForum God

Group: Forum Members
Last Login: Today @ 11:19:17 AM
Posts: 1,795, Visits: 4,572
Takeshi (10/8/2008)
Could you tell me which thread link on vbforums that same with my problem ?

I just did a quick search for picture color getpixel because getpixel is the API call. It came back with 57 topics. Image color getpixel came back with 41.

I would also recommend you do a search on PSC

Keith

http://www.martin2k.co.uk/forums/index.php?act=idx

I've been programming with VB for 14 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.
 
Post #25941
Posted 4/24/2009 7:55:34 PM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: 7/23/2010 8:17:22 PM
Posts: 169, Visits: 778

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

Post #27564
« Prev Topic | Next Topic »

13 posts, Page 2 of 2. ««12

Reading This TopicExpand / Collapse
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Admin, Mod

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 6:37pm