?
Solved

Print Line

Posted on 2000-04-15
4
Medium Priority
?
171 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 150 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses

801 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