dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: VB
Expertise: Intermediate
Jul 11, 2006

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


Printing Color Lines in VB

Have you ever had a problem printing lines in color from VB6 (SP4)? The following code works correctly on a PictureBox, but prints black on the Printer (HP LaserJet and Lexmark):

    Object.ForeColor = vbRed
    Object.Line (X1, Y1)-(X2, Y2)    ' red on PictureBox, black on Printer
    Object.Print "Text"              ' ok on both PictureBox and Printer
The solution is to add the following color argument to your statement:
 
    Object.ForeColor = vbRed
    Object.Line (X1, Y1)-(X2, Y2), vbRed  ' ok on both PictureBox and Printer
    Object.Print "Text"                   ' ok on both PictureBox and Printer
Swaminathan Raghavan
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date