Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

createdc function in delphi

Status
Not open for further replies.

dazappa007

Programmer
Oct 24, 2007
4
US
I'm trying to convert the following from VB to delphi.
Code:
GetCursorPos z
screendc = CreateDC("DISPLAY", "", "", 0&)
color (the Hex value is
Text1 = GetPixel(screendc, z.x, z.y)
Picture1.BackColor = GetPixel(screendc, z.x, z.y)
DeleteDC (screendc)
Here's the line:
Code:
screendc := CreateDC("DISPLAY", "", "", 0);
But it gives me this "[Error] Unit1.pas(33): Illegal character in input file: '"' ($22)"

 
1) Check the proper variable types required for CreateDC.

2) You are using double-quotes, when Delphi requires single-quotes.

If it's what I think you're trying to do, you want:

Code:
screendc := CreateDC('DISPLAY', nil, nil, nil);

----------
Measurement is not management.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top