Solved

Question about using a color to draw a border

Posted on 2011-09-28
1
240 Views
Last Modified: 2013-12-17
Hi,

I have this methode that I have put in the code-section.
It works great.

Can this code be changed using this:   (Color.FromArgb(0xC2, 0xC4, 0xCB))

Peter
 
private void StickyNotes_Paint(object sender, PaintEventArgs e)
        {
            string HexColor = "#c2c4cb";
            Color c = System.Drawing.ColorTranslator.FromHtml(HexColor);
            using (Pen pen = new Pen(c, 2))
            {
                e.Graphics.DrawRectangle(pen, this.ClientRectangle);
            }
        }

Open in new window

0
Comment
Question by:peterkiers
1 Comment
 
LVL 9

Accepted Solution

by:
xav056 earned 500 total points
ID: 36716310
Color c =System.Drawing.Color.FromArgb(246,246,246)
or
ColorTranslator.FromOle(RGB(255,255,192))
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

829 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