How to Assgin Hotkey to a C#'s Function?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
zhanglei1371
Posts: 28
Joined: 05 Aug 2014, 02:01

How to Assgin Hotkey to a C#'s Function?

19 Jan 2021, 22:39

Hello everyone,I met a difficult problem about assign hotkey in C#.
As we know,we can use Autohokey H to regsvr in window,Then we Can use ahk through Com.Here is the function in C#:
addfile/addscript/ahkassign/ahkdll/ahkexec/ahkexecute/ahklabel/ahkgetvar...and so on.
But what I want is how to assign a hotkey to C#'s User defind Function with ahk.
such as below :

Code: Select all

    Private Sub Button1_Click(sender As Object, e As RibbonControlEventArgs) Handles Button1.Click
        Dim frm = New Form1()
        frm.Show()
    End Sub
if I want to have the same destination with ahk like this:

Code: Select all

<^<+<#!numpad4::
        Dim frm = New Form1()
        frm.Show()
return
what should I do?(The code above is wrong,I know :D )
Thx very Much for the help!
Attachments
image.png
image.png (42.05 KiB) Viewed 180 times

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot] and 120 guests