Click here to Skip to main content
15,898,035 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: cd database in vb.net Pin
Oakman10-Nov-09 14:43
Oakman10-Nov-09 14:43 
AnswerRe: cd database in vb.net Pin
Christian Graus10-Nov-09 13:39
protectorChristian Graus10-Nov-09 13:39 
GeneralRe: cd database in vb.net Pin
Oakman10-Nov-09 14:45
Oakman10-Nov-09 14:45 
GeneralRe: cd database in vb.net Pin
Christian Graus10-Nov-09 15:06
protectorChristian Graus10-Nov-09 15:06 
GeneralRe: cd database in vb.net Pin
Oakman10-Nov-09 15:13
Oakman10-Nov-09 15:13 
AnswerRe: cd database in vb.net Pin
Christian Graus10-Nov-09 17:33
protectorChristian Graus10-Nov-09 17:33 
GeneralRe: cd database in vb.net Pin
Shameel11-Nov-09 23:26
professionalShameel11-Nov-09 23:26 
QuestionTrouble Reading Pixel Of Another Application Pin
Member 436831610-Nov-09 8:55
Member 436831610-Nov-09 8:55 
Hi I'm trying to read a selected pixel color of another application but having some difficulties. Here's the code:

   <br />
Public Sub GetNewPicture(ByVal hwnd As IntPtr, ByVal WindowWidth As Integer, ByVal WindowHeight As Integer)<br />
<br />
Dim b As Bitmap<br />
Dim gfx As Graphics = Graphics.FromHwnd(hwnd)<br />
<br />
b = New Bitmap(WindowWidth, WindowHeight, gfx)<br />
<br />
MsgBox(b.GetPixel(5, 5).R)<br />
<br />
End Sub<br />


The b.getpixel(5,5).R always return 0. I use this approach because I don't want too use the standard GetPixel Api because it's way too slow. But I can't get this to work. Help is really apprechiated.

EDIT: Forgot to tell you that I want to read the pixel color of the program even if it's not the top-most window (Hidden by another window). Would this ever be possible or is it impossible?
AnswerRe: Trouble Reading Pixel Of Another Application Pin
Christian Graus10-Nov-09 9:00
protectorChristian Graus10-Nov-09 9:00 
GeneralRe: Trouble Reading Pixel Of Another Application [modified] Pin
Member 436831610-Nov-09 9:11
Member 436831610-Nov-09 9:11 
GeneralRe: Trouble Reading Pixel Of Another Application Pin
Christian Graus10-Nov-09 10:18
protectorChristian Graus10-Nov-09 10:18 
GeneralRe: Trouble Reading Pixel Of Another Application [modified] Pin
Member 436831610-Nov-09 10:50
Member 436831610-Nov-09 10:50 
GeneralRe: Trouble Reading Pixel Of Another Application Pin
Christian Graus10-Nov-09 11:59
protectorChristian Graus10-Nov-09 11:59 
GeneralRe: Trouble Reading Pixel Of Another Application Pin
Member 436831610-Nov-09 12:34
Member 436831610-Nov-09 12:34 
GeneralRe: Trouble Reading Pixel Of Another Application Pin
Christian Graus10-Nov-09 13:05
protectorChristian Graus10-Nov-09 13:05 
GeneralRe: Trouble Reading Pixel Of Another Application Pin
EliottA11-Nov-09 2:35
EliottA11-Nov-09 2:35 
QuestionSend Keys from keyboard Pin
shaina223110-Nov-09 6:55
shaina223110-Nov-09 6:55 
AnswerCross post Pin
dan!sh 10-Nov-09 6:59
professional dan!sh 10-Nov-09 6:59 
AnswerRe: Send Keys from keyboard Pin
The Man from U.N.C.L.E.10-Nov-09 7:02
The Man from U.N.C.L.E.10-Nov-09 7:02 
QuestionDisposing all objects Pin
Gagan.2010-Nov-09 2:42
Gagan.2010-Nov-09 2:42 
AnswerRe: Disposing all objects Pin
Dave Kreskowiak10-Nov-09 3:59
mveDave Kreskowiak10-Nov-09 3:59 
AnswerRe: Disposing all objects Pin
David Mujica10-Nov-09 4:01
David Mujica10-Nov-09 4:01 
GeneralRe: Disposing all objects Pin
Luc Pattyn10-Nov-09 4:06
sitebuilderLuc Pattyn10-Nov-09 4:06 
AnswerRe: Disposing all objects Pin
Shameel10-Nov-09 5:06
professionalShameel10-Nov-09 5:06 
GeneralRe: Disposing all objects Pin
Paulo Zemek10-Nov-09 8:04
Paulo Zemek10-Nov-09 8:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.