View Single Post
Old 28th March 2020, 02:14   #1571  |  Link
AMED
Registered User
 
AMED's Avatar
 
Join Date: Sep 2004
Location: Auckland, New Zealand
Posts: 466
i made a small change to the this sub routine

Code:
    Shared ReadOnly Property Startup() As String
        Get
            If StartupValue Is Nothing Then
                Dim buffer As New StringBuilder(500)
                QueryFullProcessImageName(Process.GetCurrentProcess.Handle, 0, buffer, buffer.Capacity)
                StartupValue = buffer.ToString.Dir
            End If

            Return StartupValue
        End Get
    End Property
To this and it fixes the problem

Code:
    Shared ReadOnly Property Startup() As String
        Get
            If StartupValue Is Nothing Then
                StartupValue = Application.StartupPath.FixDir
            End If

            Return StartupValue
        End Get
    End Property


this is the first time i've ever done something in .net so i'm sure there is a more robust way to fix it.
__________________
A Man Eating Duck

Last edited by AMED; 28th March 2020 at 02:25.
AMED is offline