Skip to content

A simple library to use a Messagebox for Windows Forms, which will detect the pressed keys and return it for easy assignatios of HotKeys

License

Notifications You must be signed in to change notification settings

PabloHorno/HotKeyDialog

Repository files navigation

HotKeyDialog

A (realy) simple library to use a kind of Messagebox for Windows Forms, which will detect the pressed keys and return it for easy assignatios of HotKeys

CI

Getting Started

Here is a solution with two projects on it. One is the actual .dll library and the other is a WindowsFormsApp for testing purposes. You can find how to use the library in that proyect.

How to use it

(In the solution you will find a project named Example in which there are the two examples here explained) First we will need to define the variable to storage the keypressed

HotKey hotkey = new HotKey();

Then we will show to the user the HotKeyDialog, so he will input the keycombination and we will get those keys returnted.

hotkey = HotKeyMessageBox.Show("Title", "Please press the key combination");

Full code

using HotKeyDialog;
...

 HotKey hotkey = new HotKey();

 if (HotKeyMessageBox.Show("Title", "Please press the key combination", out hotkey) == DialogResult.OK)
     label.Text = "You have pressed the keys: " + hotkey.ToString();
 else
     label.Text = "You have closed the dialog. There is no input";

Installing

  1. Download the HotKeyDialog.dll and the open your project in visual studio
  2. Go to References -> Add ->Browse
  3. Then find the path where you downloaded the .dll and thats it.

Dowloading

You can download the library from here Release v1.0

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Hat tip to anyone whose code was used

About

A simple library to use a Messagebox for Windows Forms, which will detect the pressed keys and return it for easy assignatios of HotKeys

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages