On Oct 3, 11:26*am, karim <ka...@discussions.microsoft.comwrote:
hello kimiraikkonen
* * * * * * * *thanks for your help. to answer you question for what i'm
aiming at, i'm trying to have a button to open a drive on the network. but i
want it to display a msg if that drive is not mapped or linked to the current
computer.
Hi,
I'm not fully sure about how to determine if a drive is mapped through
an API call, however based on a logic, you may also consider using
DriveInfo object to determine if the specified drive IsReady, then if
it's ready, explore drive content:
'---------------------------------
Private Sub Button27_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button27.Click
' Where letter "Z:" is supposed to be your network drive
Dim mydrive As New IO.DriveInfo("Z:")
If mydrive.IsReady = True Then
' If it's ready, explore drive using Windows Explorer
System.Diagnostics.Process.Start("Z:")
Else
MsgBox("Drive not ready/unavailable")
End If
End Sub
'------------------------------
Hope that makes a bit sense,
Onur Güzel