[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.2

Accessing Colors Other Than VB's Eight (i.e. vbBlack, vbWhite....)

Asked by John500 in Visual Basic Programming

Tags: vbblack, vbwhite

I'm currently developing reports using VB and a report tool (Crystal Reports) which is an Add-In to VB.  Crystal Reports offers background colors such as Navy and Silver.

I decided it would be best to change the background color to white (from
silver) during the print job to save toner.  However, getting the colors
back to their original state has been a trick for one reason.  That  is, not
all colors offered by Crystal Reports are available in VB while programming.

I need the report header background to be Navy and the header text to be
white.  All other bacground should be silver.  I have the code that turns
the colors to white and black within the PrintClicked command, and I'm almost
done with the code which turns it all back within the RefreshClicked
command:


For the Print Job:

Private Sub CRViewer1_PrintButtonClicked(UseDefault As Boolean)
Dim crSections As CRAXDRT.Sections
Dim crSection As CRAXDRT.Section
Dim crTextObject As Object
Dim crReportObject As Object

Report.SelectPrinter Printer.DriverName, Printer.DeviceName, Printer.Port
Set crSections = Report.Sections

     For Each crSection In crSections
         crSection.BackColor = vbWhite
         Report.Text8.TextColor = vbBlack

     Next crSection
End Sub


Turning The Colors Back:

Private Sub CRViewer1_RefreshButtonClicked(UseDefault As Boolean)

Dim crSections As CRAXDRT.Sections
Dim crSection As CRAXDRT.Section
Dim crTextObject As Object
Dim crReportObject As Object
Font.Color

Report.SelectPrinter Printer.DriverName, Printer.DeviceName, Printer.Port
Set crSections = Report.Sections

     For Each crSection In crSections
         crSection.BackColor = vbsilver
         Report.Section1.BackColor = vbNavy
         Report.Text8.TextColor = vbWhite

     Next crSection

End Sub

The problem here is that there is no such thing as 'vbSilver' or 'vbNavy'.
How can I get those colors?  I was thinking I could create 'TextColor'
variables within the PrintClicked command and set them to the Navy and Silver objects of the header background and report background.  This would be done previous to turning the backgrounds white.  If that sounds good, can you tell me how the syntax is done and whether I can call these variables within the RefreshButtonClicked command when resetting the colors?

I'll take any suggestions for a different approach but I think this might be simplest.  Can you edit the code above if my idea sounds good, thanks.

Here are the only VB colors available:

vbBlack
vbRed
vbGreen
vbYellow
vbBlue
vbMagenta
vbCyan
vbWhite

[+][-]02/16/00 08:40 AM, ID: 2527782Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Visual Basic Programming
Tags: vbblack, vbwhite
Sign Up Now!
Solution Provided By: Erick37
Participating Experts: 2
Solution Grade: A
 
[+][-]02/13/00 10:19 AM, ID: 2516683Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/13/00 10:56 AM, ID: 2516728Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/13/00 11:33 AM, ID: 2516789Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/13/00 12:03 PM, ID: 2516834Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/13/00 02:26 PM, ID: 2517043Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/13/00 03:00 PM, ID: 2517115Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/13/00 03:04 PM, ID: 2517128Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/13/00 03:20 PM, ID: 2517163Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/13/00 03:27 PM, ID: 2517178Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/14/00 08:51 AM, ID: 2519386Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/14/00 09:20 AM, ID: 2519515Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/14/00 10:57 AM, ID: 2519833Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/14/00 11:50 AM, ID: 2520042Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/15/00 10:04 AM, ID: 2523855Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/15/00 10:09 AM, ID: 2523875Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/15/00 10:20 AM, ID: 2523930Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/15/00 11:09 AM, ID: 2524141Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/15/00 11:44 AM, ID: 2524277Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/16/00 07:31 AM, ID: 2527484Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/16/00 07:54 AM, ID: 2527601Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92