VB.NET - Forms App
Public Function GetAppPath() As String
return System.Windows.Forms.Application.StartupPath
End Function
VB.NET - Console App
Imports System.Reflection
...
Public Function GetAppPath() As String
Return Path.GetDirectoryName([Assembly].GetEntryAssembly().Location)
End Function
VB.NET - on Smart Device (Windows Mobile) Platform
Imports System.Reflection
...
Public Function GetAppPath() As String
Dim asm As [Assembly] = [Assembly].GetExecutingAssembly()
return System.IO.Path.GetDirectoryName(asm.GetName().CodeBase)
End Function
4 comments:
Nice code man, thanks a lot
Thanks!!
Thanks a lot pal, excelent code!!!
Youre my hero man
Post a Comment