Solved

Question about using a color to draw a border

Posted on 2011-09-28
1
228 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

705 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

12 Experts available now in Live!

Get 1:1 Help Now