Re: Drawing a line with a bevel ot sunken effect

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Bob
Thanks for the reply, I ended taking the 2 line approach; however I didn't
know about ContralPaint. What would you suggest?

Thanks again.
Craig

"Bob Powell [MVP]" wrote:

> That's impossible to do with a 1 pixel line. The minimum is two pixels.
>
> You can do your own by drawing rectangles offset from one another by a pixel
> or use the ControlPaint class which has some border drawing routines.
>
> --
> Bob Powell [MVP]
> Visual C#, System.Drawing
>
> Find great Windows Forms articles in Windows Forms Tips and Tricks
> http://www.bobpowell.net/tipstricks.htm
>
> Answer those GDI+ questions with the GDI+ FAQ
> http://www.bobpowell.net/faqmain.htm
>
> All new articles provide code in C# and VB.NET.
> Subscribe to the RSS feeds provided and never miss a new article.
>
>
>
>
>
> "Craig" <Craig@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:C067140D-F4CE-46AA-A4F4-2113854E206D@xxxxxxxxxxxxxxxx
> > Hi
> >
> > I'm trying to draw a 1px horizontal line that has a sunken/bevel effect.
> > Same style as the seperator lines displayed in a file property dialog
> > (open
> > Windows Explorer, right click a file, select Properties)
> >
> > Fairly new to WinForms, so any suggestions are appreciated.
> >
> > Craig
>
>
>
.



Relevant Pages

  • Re: Create control with drop-down similar to ComboBox
    ... Bob Dankert ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... private void button1_Click ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Owner drawn menus, XP or MS Outlook
    ... > When I said roll up your sleeves I really meant roll 'em up to your armpits ... > Find great Windows Forms articles in Windows Forms Tips and Tricks ... >> Thanks Bob, this is the type of answer I anticipated but unfortunately not ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Working with Region
    ... so I am trying to match to magenta correct? ... > Bob Powell ... > Find great Windows Forms articles in Windows Forms Tips and Tricks ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Changing dpi
    ... Thanks Bob! ... > Find great Windows Forms articles in Windows Forms Tips and Tricks ... > Answer those GDI+ questions with the GDI+ FAQ ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: ** READ THIS BEFORE POSTING - answers to frequently asked questions 2003.08.19
    ... Bob Geldof wrote: ... >> I just heard about a new Microsoft security patch update. ... >> I forgot my Windows logon password and can't log in. ...
    (microsoft.public.security)