computer1000
asked on
black text appears in the shaded box?
How do you print a shaded rectangle (box) containing black text by using Printer object? I don't want any API! Any ideas?
You could do something like this:
Printer.DrawWidth = 5
Printer.Line (50, 50)-Step(1440, 1440), , B
Printer.CurrentX = 500
Printer.CurrentY = 500
Printer.FontSize = 20
Printer.FontBold = True
Printer.Print "test"
Printer.DrawWidth = 5
Printer.Line (50, 50)-Step(1440, 1440), , B
Printer.CurrentX = 500
Printer.CurrentY = 500
Printer.FontSize = 20
Printer.FontBold = True
Printer.Print "test"
ASKER
Yes I could do something like that above. I use my code below.
'Printer.DrawWidth = 5
'Printer.FillColor = &H808080
'Printer.FillStyle = 0
'Printer.ForeColor = vbBlack
'Printer.FontTransparent = True
'Printer.Print ""
'Printer.Print "Hello this is a test"
'Printer.Line (0, 500)-(1400, 200), &HC0C0C0, B
'Printer.EndDoc
It does not show a shaded box here. What's wrong with my code?
'Printer.DrawWidth = 5
'Printer.FillColor = &H808080
'Printer.FillStyle = 0
'Printer.ForeColor = vbBlack
'Printer.FontTransparent = True
'Printer.Print ""
'Printer.Print "Hello this is a test"
'Printer.Line (0, 500)-(1400, 200), &HC0C0C0, B
'Printer.EndDoc
It does not show a shaded box here. What's wrong with my code?
What do you mean by it doesn't show a shaded box, it doesn't print anything? If so, it may be outside your printer's minimum margins. Try this and see if it works.
Printer.DrawWidth = 5
Printer.FillColor = &H808080
Printer.FillStyle = 0
Printer.ForeColor = vbBlack
Printer.Line (0, 0)-(5000, 5000), &HC0C0C0, B
'Change the current x and y locations to where
'you want to print the text
Printer.CurrentX = 1500
Printer.CurrentY = 2500
Printer.FontBold = True
Printer.Print "Hello this is a test"
Printer.EndDoc
Printer.DrawWidth = 5
Printer.FillColor = &H808080
Printer.FillStyle = 0
Printer.ForeColor = vbBlack
Printer.Line (0, 0)-(5000, 5000), &HC0C0C0, B
'Change the current x and y locations to where
'you want to print the text
Printer.CurrentX = 1500
Printer.CurrentY = 2500
Printer.FontBold = True
Printer.Print "Hello this is a test"
Printer.EndDoc
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi computer1000,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:
Accept bob_online's comment(s) as an answer.
computer1000, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you. DO NOT accept this comment as an answer.
EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:
Accept bob_online's comment(s) as an answer.
computer1000, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you. DO NOT accept this comment as an answer.
EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
Moving to the PAQ
kb
Experts Exchange Moderator
kb
Experts Exchange Moderator
ASKER