?
Solved

Picture Viewer Fillcolor wont work!

Posted on 2004-10-18
4
Medium Priority
?
203 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
Suggested Courses
Course of the Month11 days, 20 hours left to enroll

752 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