Guard NotifyIcon.Text against 63-char Windows limit#126
Merged
Conversation
…ption Co-authored-by: cerebrate <371623+cerebrate@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] WIP address feedback from PR #123 for milestone changes
Guard NotifyIcon.Text against 63-char Windows limit
Feb 28, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Guards WinForms tray tooltip updates against the Windows NotifyIcon.Text 63-character limit to prevent ArgumentException crashes during tray icon updates.
Changes:
- Introduced a
MaxNotifyIconTextLength = 63constant inMainForm. - Truncates the dynamic “jiggling” tooltip text and appends
...when it would exceed the limit.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NotifyIcon.TextthrowsArgumentExceptionif assigned a string longer than 63 characters. The jiggling tooltip — which includes period, random-variation flag, mode, and distance — can easily exceed this limit, crashing the app on tray icon updates.Changes
MainForm.cs: AddedMaxNotifyIconTextLength = 63constant; truncates tooltip to 60 chars with...when over the limit:🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.