Hi all,

What's the best way to either
1) Hide and then show the mainform
or
2) Call a method(?) in the mainform

using a global hotkey? I've currently got it working such that a hotkey in program.cs will simply create a new instance of mainform but this is not what I want.

Thanks!

you need to override the WndProc method of your form, and be sure to register your hotkey using that form's handle. then you check for the hotkey id in the wndproc and call any method you want to there.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.