Picture Viewer Fillcolor wont work!

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?
synergyautoAsked:
Who is Participating?
 
Michael_DCommented:
Try

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


Hop it helps :)

Michael
0
 
synergyautoAuthor Commented:
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
 
Michael_DCommented:
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
 
synergyautoAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.