Solved

Print Line

Posted on 2000-04-15
4
163 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 AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

778 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