Solved

Picture Viewer Fillcolor wont work!

Posted on 2004-10-18
4
189 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
  • 2
  • 2
4 Comments
 

Author Comment

by:synergyauto
Comment Utility
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
Comment Utility
Try

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


Hop it helps :)

Michael
0
 
LVL 13

Expert Comment

by:Michael_D
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now