Solved

Print Line

Posted on 2000-04-15
4
162 Views
Last Modified: 2010-05-02
How can i print a line on an image with the XOR style using API?

With Visual Basic, it's easy i just put Picture1.DrawMode vbXorPen

How can i do it using API call.
0
Comment
Question by:gfouin
  • 2
4 Comments
 
LVL 3

Expert Comment

by:vikiing
ID: 2718864
¿Are you trying to print a line to the printer?
0
 

Author Comment

by:gfouin
ID: 2718896
I'm trying to print on a PICTURE control.

0
 
LVL 32

Accepted Solution

by:
Erick37 earned 50 total points
ID: 2719003
Declare Function SetROP2 Lib "gdi32" Alias "SetROP2" (ByVal hdc As Long, ByVal nDrawMode As Long) As Long

Public Const R2_XORPEN = 7      

Declare Function TextOut Lib "gdi32" Alias "TextOutA" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpString As String, ByVal nCount As Long) As Long

Declare Function SetBkMode Lib "gdi32" Alias "SetBkMode" (ByVal hdc As Long, ByVal nBkMode As Long) As Long

Public Const OPAQUE = 2
Public Const TRANSPARENT = 1
0
 
LVL 32

Expert Comment

by:Erick37
ID: 2719006
Or

Picture1.Print "Text to print"
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now