从键盘按下启动WinApp [英] Launch WinApp from Keyboard press

查看:61
本文介绍了从键盘按下启动WinApp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我需要一种方法来启动我的WinForms-app(app.exe)只需按一下

键盘组合(如( Ctrl-Alt-P)。

此功能应该出现在开箱即用状态。在应用程序

(app.exe)部署在客户端的PC上之后。我知道的唯一方法是在桌面上放置一个快捷方式,并将ShortCut Key关联起来。通过

右键单击桌面上的shorcut。


现在 - 我如何使用Windows Installer进行安装(来自

VS.NET 2003)??


万分感谢!


/ Ole Hanson

解决方案

Ole Hanson写道:



我需要一种方法来启动我的WinForms-app(app.exe)只需按一下
键盘组合,如(Ctrl-Alt-P)。
此功能应该出现在开箱即用状态。应用程序
(app.exe)部署在客户端的PC上之后。我知道的唯一方法是在桌面上放置一个快捷方式并关联一个ShortCut Key。通过右键单击桌面上的shorcut来实现它。

现在 - 我如何使用Windows Installer(来自VS.NET 2003)进行安装?感谢上百万!

/ Ole Hanson




我对...感兴趣同样的问题。只有我在寻找将我的progmra分配给像Print Screen这样的键。

我怀疑它是否可能。也许有一些注册表设置。

否则程序必须运行你已经注册了一个热键,所以消息被发送到应用程序。

我想你可以做一个非常小的服务,然后启动主应用程序。

我的程序需要大约13mb的内存才能保持打开状态,这不是我从计算机开始可以买得起的东西。




安装项目中没有直接指定exe的快捷键的方法。


试试这个


创建ac #project以为您的EXE创建Shell链接。您可以在程序中创建Shell Link时指定

快捷键。


编译程序后,将C#程序添加为自定义操作。在

自定义操作编辑器中


要在c#中创建Shell链接,请使用以下URL中指定的界面

http://www.vbaccelerator.com/home/ NE ... jects / Creating

_and_Modifying_Shortcuts / ShellLink_Code_zip_ShellLink%5CShellLink_cs.asp


-

Shak < br $> b $ b(休斯顿)

" Ole Hanson" <醇******** @ ole.ole>在消息中写道

新闻:cc ********** @ news.cybercity.dk ...



我需要一种方法来启动我的WinForms-app(app.exe),只需按下
a键盘组合(Ctrl-Alt-P)。
此功能应该出现在盒"应用程序
(app.exe)部署在客户端的PC上之后。我知道的唯一方法是
在桌面上放置一个快捷方式并关联一个ShortCut Key。通过右键单击桌面上的shorcut来实现它。

现在 - 我如何使用Windows Installer(来自VS.NET 2003)进行安装?感谢上百万!

/ Ole Hanson



你也应该调查全球钩子:
http://www.codeproject.com /csharp/globalhook.asp

一个解决方案是安装一个全局钩子并让你的应用程序运行在

的后台(甚至可能是在启动时运行的服务)。钩子

然后可以启动应用程序的主窗口。


-

John Wood

电子邮件:priorganize.com上的名字,点,名字

" Ole Hanson" <醇******** @ ole.ole>在消息中写道

新闻:cc ********** @ news.cybercity.dk ...



我需要一种方法来启动我的WinForms-app(app.exe),只需按下
a键盘组合(Ctrl-Alt-P)。
此功能应该出现在盒"应用程序
(app.exe)部署在客户端的PC上之后。我知道的唯一方法是
在桌面上放置一个快捷方式并关联一个ShortCut Key。通过右键单击桌面上的shorcut来实现它。

现在 - 我如何使用Windows Installer(来自VS.NET 2003)进行安装?感谢百万!

/ Ole Hanson



Hi

I am in need of a way to launch my WinForms-app (app.exe) just by pressing a
keyboard combination like (Ctrl-Alt-P).
This functionality should be present "out of the box" after the app
(app.exe) is deployed on the Client''s PC. The only way I know - is to place
a shortcut on the desktop and associate a "ShortCut Key" to it by
right-clicking on the shorcut on the desktop.

Now - how do I, do that during installation using Windows Installer (from
VS.NET 2003)??

Thanks a million!

/Ole Hanson

解决方案

Ole Hanson wrote:

Hi

I am in need of a way to launch my WinForms-app (app.exe) just by pressing a
keyboard combination like (Ctrl-Alt-P).
This functionality should be present "out of the box" after the app
(app.exe) is deployed on the Client''s PC. The only way I know - is to place
a shortcut on the desktop and associate a "ShortCut Key" to it by
right-clicking on the shorcut on the desktop.

Now - how do I, do that during installation using Windows Installer (from
VS.NET 2003)??

Thanks a million!

/Ole Hanson



I''m interested in the same question. Only I was looking for assigning my progmra to a key like Print Screen.
I doubt its possible though. Maybe there is some registry setting.
Otherwise the program has to be running you have register a hotkey, so messages are sent to the application.
I guess you could make a very small service that does that and then launches the main application.
My program takes around 13mb of memory to stay open, its not something I could afford starting with the computer.


There is no direct way of specifying the Shortcut key for an exe in the
setup project.

Try this

Create a c# project to create a Shell Link for your EXE. You can specify the
shortcut key while creating Shell Link in the program.

After compiling the program, add the C# program as a "Custom action" in the
"custom action editor"

To create Shell link in c# use the interface specified in the following URL

http://www.vbaccelerator.com/home/NE...jects/Creating
_and_Modifying_Shortcuts/ShellLink_Code_zip_ShellLink%5CShellLink_cs.asp

--
Shak
(Houston)
"Ole Hanson" <ol********@ole.ole> wrote in message
news:cc**********@news.cybercity.dk...

Hi

I am in need of a way to launch my WinForms-app (app.exe) just by pressing a keyboard combination like (Ctrl-Alt-P).
This functionality should be present "out of the box" after the app
(app.exe) is deployed on the Client''s PC. The only way I know - is to place a shortcut on the desktop and associate a "ShortCut Key" to it by
right-clicking on the shorcut on the desktop.

Now - how do I, do that during installation using Windows Installer (from
VS.NET 2003)??

Thanks a million!

/Ole Hanson



You should also look into global hooks:
http://www.codeproject.com/csharp/globalhook.asp

One solution is to install a global hook and have your application run in
the background (maybe even as a service that runs at startup). The hook
could then launch the main window of the application.

--
John Wood
EMail: first name, dot, second name at priorganize.com
"Ole Hanson" <ol********@ole.ole> wrote in message
news:cc**********@news.cybercity.dk...

Hi

I am in need of a way to launch my WinForms-app (app.exe) just by pressing a keyboard combination like (Ctrl-Alt-P).
This functionality should be present "out of the box" after the app
(app.exe) is deployed on the Client''s PC. The only way I know - is to place a shortcut on the desktop and associate a "ShortCut Key" to it by
right-clicking on the shorcut on the desktop.

Now - how do I, do that during installation using Windows Installer (from
VS.NET 2003)??

Thanks a million!

/Ole Hanson



这篇关于从键盘按下启动WinApp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆