Solved

color in a rectangle

Posted on 2006-07-13
4
283 Views
Last Modified: 2010-04-23
Using:
 grpContainer = Graphics.FromHwnd(Me.FindForm.ActiveForm.Handle)

With grpContainer
 .DrawRectangle(penBlue, x0, 20, h0, 80)

how can I 'fill' in the rectangle?

Or is it outside of this particular method's ability ?
0
Comment
Question by:sirbounty
  • 3
4 Comments
 
LVL 8

Accepted Solution

by:
Shakti109 earned 125 total points
ID: 17102548

You use a brush and the "fillrectangle method" as follows :


      Dim bluebrush As New SolidBrush(Color.Blue)

      With grpContainer
         .DrawRectangle(penBlue, x0, 20, h0, 80)
         .fillrectangle(bluebrush, x0, 20, h0, 80)
      end with

You can of course change the colors when you declare it to anything you wish.
0
 
LVL 67

Author Comment

by:sirbounty
ID: 17102586
trying...
0
 
LVL 67

Author Comment

by:sirbounty
ID: 17102825
Having some difficulty - opening a new Q on it...
0
 
LVL 67

Author Comment

by:sirbounty
ID: 17108482
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 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

19 Experts available now in Live!

Get 1:1 Help Now