如何为表单创建快捷方式 [英] How to create shortcut for a form

查看:88
本文介绍了如何为表单创建快捷方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好



在我的项目中,我想为表单创建快捷方式。

就像我有一个链接说创建快捷方式 ,一旦用户点击它,它就应该在面板或列表框中创建特定表单的快捷方式。

然后如果用户关闭应用程序并稍后再打开它们应该在这个地方提供快捷方式。



请告诉我该怎么做。如果我的解释令人困惑,请告诉我..



谢谢......

解决方案

这个是一种通过它的字符串名称打开表单的方法。



  Dim  appName  As   String  = Application.ProductName&   
Dim mForm 作为 字符串 = Form1
Dim f As Form = DirectCast (Type。 GetType (appName& mForm).InvokeMember(mForm,Reflection.BindingFlags.CreateInstance, Nothing Nothing Nothing ),表格)
f.Show()


这可以帮到你:

http://msdn.microsoft.com/en-us/library/25zf0ze8(v=vs.80).aspx [ ^ ]

Hi all

In my project i want to create shortcut for forms.
like i have one link saying "create shortcut", so as soon as the user clicks that,then it should create particular form''s shortcut at a panel or list box.
and after that if the user closed the application and opens it again later those shortcuts should be available at the place.

Please tell me how to do that. and please tell me if my explanation is confusing..

Thank you...

解决方案

This is a way to open a form by it''s string name.

Dim appName As String = Application.ProductName  &  "."
Dim mForm As String = "Form1"
Dim f As Form = DirectCast(Type.GetType(appName & mForm).InvokeMember(mForm, Reflection.BindingFlags.CreateInstance, Nothing, Nothing, Nothing), Form)
f.Show()


This could help you:
http://msdn.microsoft.com/en-us/library/25zf0ze8(v=vs.80).aspx[^]


这篇关于如何为表单创建快捷方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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