{"id":21543845,"url":"https://github.com/radj307/virtualbutton","last_synced_at":"2026-04-13T12:01:48.588Z","repository":{"id":108168972,"uuid":"485042840","full_name":"radj307/VirtualButton","owner":"radj307","description":"(.NET Core 6) A Windows Forms Component that implements the IButtonControl interface to emulate a Button Control.","archived":false,"fork":false,"pushed_at":"2022-05-23T23:10:04.000Z","size":85,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T19:03:59.163Z","etag":null,"topics":["csharp","dotnet","dotnet-core-6","net","netcore","netcore6","winforms","winforms-components","winforms-controls"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/radj307.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-24T14:00:36.000Z","updated_at":"2022-04-28T01:23:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"48759277-c640-45cc-9f78-6ab87c7bf3cb","html_url":"https://github.com/radj307/VirtualButton","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radj307%2FVirtualButton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radj307%2FVirtualButton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radj307%2FVirtualButton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radj307%2FVirtualButton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/radj307","download_url":"https://codeload.github.com/radj307/VirtualButton/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244130278,"owners_count":20402753,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","dotnet","dotnet-core-6","net","netcore","netcore6","winforms","winforms-components","winforms-controls"],"created_at":"2024-11-24T05:15:51.120Z","updated_at":"2025-10-04T09:27:47.788Z","avatar_url":"https://github.com/radj307.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cbr/\u003e\u003cp align=\"center\"\u003e\u003cimg alt=\"Virtual Button\" src=\"https://i.imgur.com/cDHvGW9.png\"/\u003e\u003cbr/\u003e\u003cb\u003e▼ NuGet ▼\u003c/b\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003cb\u003e▼ Github ▼\u003c/b\u003e\u003cbr/\u003e\n\u003ca href=\"https://www.nuget.org/packages/VirtualButton\"\u003e\u003cimg alt=\"Nuget\" src=\"https://img.shields.io/nuget/dt/VirtualButton?color=7B4CB5\u0026label=Downloads\u0026labelColor=4C277A\u0026logo=nuget\u0026logoColor=ECECEC\u0026style=for-the-badge\"/\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003ca href=\"https://github.com/radj307/VirtualButton\"\u003e\u003cimg alt=\"GitHub tag (latest by date)\" src=\"https://img.shields.io/github/v/tag/radj307/VirtualButton?color=4C277A\u0026label=Version\u0026labelColor=7B4CB5\u0026logo=github\u0026logoColor=ECECEC\u0026style=for-the-badge\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n***\n\n\u003cp align=\"center\"\u003e\u003cb\u003eLightweight WinForms component that makes implementing handlers for the built-in form buttons a breeze!\u003c/b\u003e\u003cbr/\u003eOf course, you can use it for whatever you want to - it is compatible with anything that accepts \u003ccode\u003eIButtonControl\u003c/code\u003e interfaces.\u003c/p\u003e\n\n# Installation\n*Visual Studio*\n \n 1. Right-Click on a `.csproj` or `.sln` file in the solution explorer, then click the ![***Manage NuGet Packages...***](https://user-images.githubusercontent.com/1927798/164995108-0be2b831-5be5-4e48-8184-46fb5149c54a.png) button.  \n      \n 2. Switch to the ***Browse*** tab and search for '__Virtual Button__'\n\n 3. Click on the ***Install*** button next to the package description:  \n    ![](https://i.imgur.com/8TkTbup.png)  \n    The code is open-sourced under the [GPLv3](https://github.com/radj307/VirtualButton/blob/main/LICENSE) license.\n\n# Usage\n\nYou can add virtual buttons using the designer, or entirely programmatically.  \n`VButton` appears at the bottom alongside other components, such as `NotifyIcon`, `Timer`, `BindingSource`, etc.\n\n## Designer\n\n1. Once you have the NuGet package installed, open the designer toolbox *(You may have to recompile the project for it to appear.)* and add the `VButton` component somewhere.  \n2. In the properties window, create a handler for the `Click` event, and put whatever code you want to execute when the associated key is pressed in the handler.\n3. Re-assign the button property at least once before attempting to use it.  \n    Common places to do this are the form's constructor or `Form.Load` event, for example:\n```cs\npublic partial class Form1 : Form\n{\n    public Form1()\n    {\n        InitializeComponent();\n\t\t\n        // Even though we set this in the designer, we have\n        //  to set it again manually for it to work correctly:\n        this.CancelButton = vButton1;\n    }\n}\n```\n\n## Programmatic\n\nYou can create VButtons with ad-hoc delegates:\n```cs\nthis.CancelButton = new VButton(delegate{\n    // Do something\n});\n```\n\nOr with any event handler compatible with `HandledEventHandler`:\n```cs\nprivate void HandlerOfHandledEvents(object sender, HandledEventArgs e)\n{\n    // ...\n}\n\nprivate void Form1_Load(object sender, EventArgs e)\n{\n    vButton1.Click += HandlerOfHandledEvents!;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradj307%2Fvirtualbutton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fradj307%2Fvirtualbutton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradj307%2Fvirtualbutton/lists"}