I am currently working on a program in VB where I have a text box that I drag files into and the path of that file then displays in the text box. The issue is that these files are stored on multiple different servers and instead of displaying the server path it displays the drive letter that is associated on that server on that specific computer. So it displays as driveLetter:\folder\file when it should display as \server\serverName\folder\file. Here is the code. Any suggestions?
Private Sub Form1_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles Me.DragEnter
If (e.Data.GetDataPresent(DataFormats.FileDrop)) Then
e.Effect = DragDropEffects.Copy
Else
e.Effect = DragDropEffects.None
End If
End Sub
Private Sub Form1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles Me.DragDrop
Dim link() As String = e.Data.GetData(DataFormats.FileDrop)
For Each path In link
LclTxt.Text = path
Next
End Sub
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Me.AllowDrop = True
End Sub