Solved

Picture Viewer Fillcolor wont work!

Posted on 2004-10-18
4
197 Views
Last Modified: 2010-05-18
Hi all,

Been working on a sketch program for our employees to use in our custom app.  It's very basic but doesnt need to be fancy.

The app gives them the ability to draw an arc, line, box, or filled box onto a picture viewer control.

All of this works smashingly except the filled box.  I give them the option to change the fill color but the box only fills in with the forecolor (which can also be manually set to whatever the user wants).

Code I'm using is basically this:

pictest.fillstyle=vbSolid
pictest.fillcolor = fillcolor
pictest.line (x1,y1)-(x2,y2),forecolor, BF

In degug mode I have verfied that fillcolor does contain the appropriate fillcolor numbers as well.

Something i'm missing here?
0
Comment
Question by:synergyauto
[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
  • 2
4 Comments
 

Author Comment

by:synergyauto
ID: 12340359
I guess I should clarify that if the user picks black for the forecolor and red for the fillcolor I'm hoping to get a black framed box with a red interior.
0
 
LVL 13

Accepted Solution

by:
Michael_D earned 500 total points
ID: 12340562
Try

pictest.line (x1,y1)-(x2,y2),forecolor, B ' Not BF


Hop it helps :)

Michael
0
 
LVL 13

Expert Comment

by:Michael_D
ID: 12340571
From MSDN :

"If the B option is used, the F option specifies that the box is filled with the same color used to draw the box. You cannot use F without B. If B is used without F, the box is filled with the current FillColor and FillStyle. The default value for FillStyle is transparent."
0
 

Author Comment

by:synergyauto
ID: 12340585
Thank you Michael, I actually just figured that out on my own 2 secs before you posted, but you deserve the points anyway.

Thanks so much!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Saving history changes to sub form 4 56
Hide vba in gp 7 125
TT Auto Dashboard 13 104
why PtrSafe before Function on 64bit does not fix the APIs? 2 25
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

739 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