GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — TextBoxBorderColor/README.md at master · r-aghaei/TextBoxBorderColor

Expand file tree

/

README.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
11 lines (6 loc) · 1.14 KB
/

README.md

Copy path

File metadata and controls

11 lines (6 loc) · 1.14 KB
Raw
Copy raw file
Download raw file
Edit and raw actions

TextBox Border Color

You can change border color of TextBox by overriding WndProc method and handling WM_NCPAINT message. This way you can draw on non-client area of the TextBox control.

To do so, get the window device context of the control using GetWindowDC. Then to draw, create a Graphics object from that context, then draw border for control.

You need to the control when assigning new BorderColor or when the size of control changes. To do so, you can use RedrawWindow method.

MyTextBox control has a BorderColor property. The control uses BorderColor if the property values is different than Color.Transparent and BorderStyle is its default value Fixed3d. To see the themed border color, set the BorderColor to Color.Transparent.

TextBoxBorderColor

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.