You are here

Home

Programming

C# WinForms Search Textbox and Toggle Button

WinForms Search Text Box
V2: Now uses GDI+ to draw the icons. Single code file instead of code + png images.
Here is a quick control I cooked up today for a project I'm working on. It is a winforms textbox with a search/clear button. It has two modes, search and clear. Each mode will show a different button and trigger a different event when the button is clicked. When using this in your own project, be sure to update the image paths and namespace. In the spirit of open source the license is GPL. I borrowed some code from other sources and they are listed in the code file.
Clear mode shows an X icon and fires the Cleared event. Clear mode also and clears the textbox when the button is clicked. Search mode shows the magnifying glass icon and fires the Search event when clicked. The default text can be customized using properties. The icons have an alpha channel use GDI+ so if you want to change the color of the button it should still look OK.

Download: https://github.com/BinaryConstruct/CSharpControls

search textbox

Winforms Toggle Button
Functions like a checkbox, but its a button!
toggle button

OBD-II Dashboard

Next Project:

OBD-II Dashboard with Logging

 Here is a teaser screenshot.

OBD-II  Dashbaord

ELM327 OBD-II

Interfacing with vehicle OBD-II

Using a board based around the ELM327 I designed this simple software interface (c#) to communicate with my vehicles onboard OBD-II connection. The ultimate goal of this is to build a gauge display on an LCD driven by an ARM microprocessor. Currently the project is in its initial phase where I am working on decyphering the PIDs and their responses. 

You can download the source code for the program from http://github.com/BinaryConstruct/OBD-II-ELM-Serial

Feel free to modify, reuse, redistribute etc (See GNU GPL 3). Thanks.

 

OBDII Elm Serial Test Application

 

Connect

RSStwitter

Support

Feel like supporting BinaryConstruct?

Recent Posts


TEdit
Instructions To install TEdit, simply download the latest version and unzip all contents to the...

TEdit - Terraria Map Editor
TEdit 3 Beta for Terraria 1.1.1 is available. If you would like to see it, check out github! What...

C# WinForms Search Textbox and Toggle Button
WinForms Search Text Box V2: Now uses GDI+ to draw the icons. Single code file instead of code +...

Resistor Heater X2
It turns out a single resistor wasn't enough to drive the extruder, so following some ideas from...

Caution Choosing a Thermistor
Temperature Tuning Part 1 Thermistors work very well when measuring temperatures near the middle of...