Solved

Print Line

Posted on 2000-04-15
4
161 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

760 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

22 Experts available now in Live!

Get 1:1 Help Now