如何获取vb.net exe的快捷方式图标名称 [英] How to get shortcut icon name of vb.net exe

查看:285
本文介绍了如何获取vb.net exe的快捷方式图标名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我如何获取从vb.net应用程序生成的exe快捷文件的名称.例如

我有基于快捷方式图标名称的方案,我必须在应用程序中执行一些操作.我有vb.net应用程序,我也生成了exe.现在,我正在为该exe创建3快捷方式到桌面(例如My1.exe,My2.exe,My3.exe)

如果我单击My1.exe,则应该以字符串形式获取"My1.exe"(如wise ...)

因此,根据我单击的快捷方式,我正在执行进一步的操作(即禁用和启用表单等.)

有人可以帮我吗...

Hi,

How can i get a name of shortcut file of exe, which is generated from vb.net application. for example

I have the scenario as based on shortcut icon name i have to do some action in application. i have the vb.net application and i generated the exe also. Now I am creating the 3 shortcut for that exe into desktop(like My1.exe,My2.exe,My3.exe)

if i click My1.exe then i should get "My1.exe" as string (like wise...)

So based on which shortcut i clicked i am doing the further action(i.e disabling and enabling the forms or etc..)

Can anybody help me on the same...

推荐答案

我希望以下代码对您有所帮助...
I hope the code below will helpful to you...
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim sFileName As String = String.Empty

    sFileName = Application.ExecutablePath
    MsgBox("FullFileName: " & sFileName & vbCr & _
            "Executable name: " & IO.Path.GetFileName(sFileName) & vbCr & _
            "Path of executable: " & IO.Path.GetDirectoryName(sFileName))
End Sub



进一步了解命令行参数 [ ^ ]



Read more about commandline arguments[^]


这篇关于如何获取vb.net exe的快捷方式图标名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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