•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 426,521 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,904 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 211 | Replies: 2
![]() |
•
•
Join Date: Jul 2008
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
hi i'm creating a program with the same effect as the green screen used in the movies and i'm having problem in getting the right value of green colors, but when i uses black or white as a color to be mask it works but not with the green, can anyone give me an advise for this.
thanks
here is my codes
thanks
here is my codes
For k = 0 To pic1.ScaleHeight
clr = GetPixel(pic1.hdc, i, k)
If clr = vbGreen Then
SetPixel pic3.hdc, i, k, vbWhite
Else
SetPixel pic3.hdc, i, k, vbBlack Last edited by Tekmaven : Jul 21st, 2008 at 2:22 pm. Reason: Code tags
•
•
Join Date: Feb 2008
Location: Sivakasi, Tamilnadu, India
Posts: 458
Reputation:
Rep Power: 1
Solved Threads: 79
Hi,
GetPixel() returns the combination of Red, Green and Blue. So the Color you are checking
This will check only Red is 0, Blue is 0 and Green is 255.
But you may need to separate the Color values.
Also u can use Point(X as Single, y as Single) to get the (x,y) Pixel Value instead of GetPixel().
GetPixel() returns the combination of Red, Green and Blue. So the Color you are checking
clr = GetPixel(pic1.hdc, i, k) If clr = vbGreen Then
This will check only Red is 0, Blue is 0 and Green is 255.
But you may need to separate the Color values.
Also u can use Point(X as Single, y as Single) to get the (x,y) Pixel Value instead of GetPixel().
Last edited by selvaganapathy : Jul 21st, 2008 at 10:46 am.
KSG
![]() |
•
•
•
•
•
•
•
•
DaniWeb Visual Basic 4 / 5 / 6 Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Green Screen on laptop (Web Browsers)
- Tecra A1 LCD screen half-missing (Monitors, Displays and Video Cards)
- LCD Monitor - Vertical lines with certain grays (Monitors, Displays and Video Cards)
- lg T710BH problem (Monitors, Displays and Video Cards)
- My monitor is green now???? (Monitors, Displays and Video Cards)
- Windows Media Player crashing or puts a green screen instead of video... (Windows Software)
- green screen (Monitors, Displays and Video Cards)
- Bright green display problem (Windows NT / 2000 / XP / 2003)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: How Can Listbox item displayed like "a,b,c,d"
- Next Thread: challange


Linear Mode