Draw a circle around anything on your screen to search, OCR, translate, or reverse-image-search it — inspired by Android's Circle to Search feature.
CircleSearch.sln
├── CircleSearch/ ← Settings UI (WPF-UI + Fluent Design, .NET 10)
├── CircleSearch.Core/ ← Background service: hotkey listener + process orchestrator
├── CircleSearch.Tray/ ← System tray app (WPF-UI, persistent in taskbar)
├── CircleSearch.Overlay/ ← Fullscreen drawing overlay + action popup (pure WPF)
├── CircleSearch.CFS/ ← Shared IPC library (ConfluxService — named-pipe messaging)
└── CircleSearch.Installer/ ← WPF installer (self-contained single-file .exe)
CircleSearch (Settings UI)
│ ConfluxService (MainToCore / CoreToMain)
▼
CircleSearch.Core ◄───────────────────────────────┐
│ ConfluxService (CoreToTray / TrayToCore) │
▼ │
CircleSearch.Tray ────────────────────────────────┘
(system tray, always running)
CircleSearch.Core
│ spawns on hotkey press
▼
CircleSearch.Overlay (short-lived, exits after one capture)
CircleSearch.Core is the hub. It owns the global hotkey registration, launches/monitors the other processes, and routes messages between them via ConfluxService.
A lightweight named-pipe IPC library shared by all projects. Each channel is a pair of directional pipes carrying name|value messages. Processes call Register() then StartServiceAsync() to begin listening, and Send(name, value) to dispatch.
- Runs as a background console process (no window).
- Registers the global hotkey via
GlobalHotkeyService— a pure Win32 P/Invoke loop on a dedicated thread (no Windows.Forms dependency). - On hotkey press, spawns
CircleSearch.Overlay.exewith the current overlay config as CLI args. - Bridges messages between
CircleSearch(settings UI) andCircleSearch.Trayso neither needs to talk to each other directly. - Handles
hotkey-changeandoverlaycfg-changemessages to update hotkey registration or forward new config to the next overlay launch.
- WPF-UI / Fluent Design settings window, built on .NET Generic Host with DI.
- Single-instance enforced via a named
Mutex+ named pipe: a second launch sends"SHOW"to the running instance and exits. - Communicates settings changes to Core over CFS (
hotkey-change,overlaycfg-change). - Supports a View At Boot mode: if disabled, the process exits immediately after sending config to Core, leaving Core and Tray running silently.
- Persistent system-tray icon built with WPF-UI's
TrayIcon. - Connects to Core over CFS; relays tray menu actions (Open, Home, Settings, Exit) as
tray-eventmessages. - Reacts to
main-eventnotifications from Core to update language, theme, material, and corner radius at runtime without restarting.
- Launched fresh for each capture session; exits automatically when the action popup closes.
- Receives its entire config (search engine, OCR language, opacity, accent color) as CLI arguments parsed by
OverlayConfig.ParseArgs(). OverlayWindowcovers all monitors (VirtualScreen*bounds), captures a full screenshot on load viaBitBltWinAPI, and renders a smooth freehand stroke using Bézier geometry (CircleHelper.CreateSmoothPath).- On mouse-up, crops the bounding region of the drawn stroke (DPI-aware) and opens
ActionPopup. ActionPopupruns Tesseract OCR asynchronously via theTesseractNuGet package (TesseractEngine→PixConverter.ToPix→page.GetText()).
- Single-file WPF installer: all app binaries and
CircleSearch.Installer.exeitself are embedded as a ZIP resource inside the installer executable. - On install: extracts the payload to the chosen directory, creates shortcuts, registers with Windows (Add/Remove Programs), and optionally sets up autostart.
- On uninstall: kills running processes, removes files, shortcuts, startup entry, and registry keys; schedules self-deletion via a
cmd.exedeferred command. - Debugging the installer project in Visual Studio works without a
payload.zippresent. The ZIP is only required (and enforced) when publishing in Release viabuild.bat.
Download from: https://dotnet.microsoft.com/download/dotnet/10.0
The Overlay project uses the Tesseract NuGet package (v5.2.0) — no manual DLL installation needed. However, you still need to provide the language data files. Place them in a tessdata/ folder next to CircleSearch.Overlay.exe:
<install dir>/
├── CircleSearch.Overlay.exe
└── tessdata/
├── eng.traineddata ← English (required)
└── vie.traineddata ← Vietnamese (optional)
Download .traineddata files for any languages you need from the official repository: https://github.com/tesseract-ocr/tessdata
Run build.bat from the repository root:
build.bat
The script performs the following steps automatically:
- Publishes
CircleSearch,CircleSearch.Overlay,CircleSearch.Tray, andCircleSearch.Coreinto a temporaryinstaller-output\publish\folder. - Creates an empty
payload.zipplaceholder so the installer project compiles on pass 1. - Publishes
CircleSearch.Installer(pass 1) to obtain the installer executable. - Copies
CircleSearch.Installer.exeintopublish\so it is included in the payload. - Zips the entire
publish\folder intoCircleSearch.Installer\Resources\payload.zip. - Republishes
CircleSearch.Installer(pass 2) with the real payload embedded. - Removes all intermediate files (
publish\folder andpayload.zip).
Result: a single installer-output\CircleSearch.Installer.exe that contains every binary needed to install the application.
Note:
payload.zipis a build-time artifact and is not committed to the repository. It is created and deleted automatically bybuild.bat.
Open CircleSearch.sln in Visual Studio 2022 or later and set CircleSearch.Installer as the startup project (or any other project you want to debug). Building and running in Debug configuration works normally without payload.zip present — the payload check is skipped and the embedded resource is omitted in non-Release builds.
Run CircleSearch.Installer.exe, choose an install directory, and click Install. The installer will:
- Extract all application files to the chosen directory.
- Optionally create a Desktop and/or Start Menu shortcut.
- Optionally register
CircleSearch.exeto run at Windows startup. - Register the application in Add or Remove Programs for clean uninstallation.
After installation, launch CircleSearch from the shortcut or Start Menu. CircleSearch.exe is the single entry point — it automatically spawns Core, Tray, and all background services.
- Publish all four app projects to the same output folder (or run
build.batand copypublish\contents). - Place Tesseract
tessdata/folder next toCircleSearch.Overlay.exe. - Launch
CircleSearch.exe— this is the single entry point. It automatically starts Core and Tray in the background. - Press the hotkey (default Ctrl + Win + Z) to activate the overlay.
Note:
CircleSearch.execan be set to run at Windows startup via the Settings UI. When the View At Boot option is disabled, the settings window will not appear on startup — Core and Tray continue running silently in the background.
- Activate — Press the hotkey (default
Ctrl + Win + Z). - Draw — Hold left mouse button and draw a circle or region around the content you want.
- Choose an action from the popup:
- 🔍 Search — OCR the region and search with your chosen engine (Google, Bing, etc.)
- 🖼️ Search by image — Copy the region to clipboard and open Google Lens
- 📋 Copy text — OCR offline and copy result to clipboard
- 🌐 Translate — OCR and open Google Translate
- Dismiss — Press
Escor click outside the popup.
Open CircleSearch.exe to configure:
| Setting | Description |
|---|---|
| Hotkey | Modifier keys (Ctrl / Win / Alt / Shift) + any key |
| Search engine | Google, Bing, DuckDuckGo, Yandex, Baidu |
| OCR language | Any language supported by your tessdata/ folder |
| Start with Windows | Register/remove from Windows startup |
| Overlay opacity | Dimming level of the fullscreen overlay |
| Accent color | Color of the drawn stroke and selection rectangle |
| Problem | Cause | Fix |
|---|---|---|
eng.traineddata missing |
Tessdata missing | Download from github.com/tesseract-ocr/tessdata and place in tessdata/ next to the exe |
| Hotkey not working | Conflicting shortcut | Change the key combination in Settings |
| Overlay does not appear | Core not running | Make sure CircleSearch.exe was launched — it spawns Core automatically |
| Poor OCR results | Region too small or blurry | Draw a larger area; ensure the text is legible on screen |
| Settings window won't open twice | Single-instance guard | The first instance will be focused automatically |
| Installer shows wrong size (~5 MB) | payload.zip was not embedded |
Delete any leftover payload.zip and re-run build.bat from scratch |
| Process | Reason for isolation |
|---|---|
| Core | Needs to stay alive in the background without a UI window; owns the hotkey Win32 message loop on a dedicated thread |
| Settings UI | Heavy WPF-UI / Fluent Design stack; only needed when the user wants to change settings |
| Tray | Must remain persistent in the system tray even when the settings window is closed |
| Overlay | Spawned fresh per capture so any crash or resource leak is self-contained; terminates immediately after use |
Inter-process communication is handled entirely by ConfluxService (named pipes), keeping each process decoupled and independently deployable.