Solved

Picture Viewer Fillcolor wont work!

Posted on 2004-10-18
4
193 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

773 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