and i can't find how to open a FolderBrowserDialog,
and then check every time if THAT portable device the user has selected is still in the computer,
if not, then then the program runs another form
Sorry for my bad english i'm dutch




Posted 30 September 2008 - 07:28 AM
Posted 30 September 2008 - 08:48 AM
' Display the openFile dialog. Dim result As DialogResult = openFileDialog1.ShowDialog()
Posted 30 September 2008 - 09:18 AM
jayman9, on 30 Sep, 2008 - 08:48 AM, said:
' Display the openFile dialog. Dim result As DialogResult = openFileDialog1.ShowDialog()
Posted 30 September 2008 - 12:19 PM
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cola As String
If FolderBrowserDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
cola = FolderBrowserDialog1.SelectedPath
Else
'als niet op OK werd geklikt
'gebeurt er niets en dit wordt aan gebruiker
'meegedeeld
MessageBox.Show("You have to choose somthing, if you don't StickKey can't work!", "Fout", _
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Me.Close()
End If
End Sub
Private Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
'HERE HAS TO BE THE SCRIPT THAT CHECKS IF THE DEVICE IS STILL INSERTED,
'or to say it in another way: a script how checks if the file/folder still can be found,
End Sub
End Class
Posted 01 October 2008 - 06:46 AM
Private Function DirExists() As Integer
Dim DirName as String
DirName ="Directory here"
Dim Dir as New DirectoryInfo(DirName)
Return If Not Dir Exists Then
MessageBox.Show("Device Not Present")
Else
MessageBox.Show("Device Found")
End If
End Function
This post has been edited by AdamR: 01 October 2008 - 06:50 AM
Posted 01 October 2008 - 10:19 AM
AdamR, on 1 Oct, 2008 - 06:46 AM, said:
Private Function DirExists() As Integer
Dim DirName as String
DirName ="Directory here"
Dim Dir as New DirectoryInfo(DirName)
Return If Not Dir Exists Then
MessageBox.Show("Device Not Present")
Else
MessageBox.Show("Device Found")
End If
End Function
Posted 01 October 2008 - 10:42 AM
Posted 01 October 2008 - 11:14 AM
Posted 01 October 2008 - 12:25 PM
Posted 01 October 2008 - 12:31 PM
Private Function DirExists() As Integer
Dim DirName As String
DirName = "c:\WINDOWS"
Dim Dir As New DirectoryInfo(DirName)
If Not DirExists Then
MessageBox.Show("Device Found")
Else
MessageBox.Show("Device Not Found")
End If
End Function
Posted 02 October 2008 - 07:39 AM
AdamR, on 1 Oct, 2008 - 12:31 PM, said:
Private Function DirExists() As Integer
Dim DirName As String
DirName = "c:\WINDOWS"
Dim Dir As New DirectoryInfo(DirName)
If Not DirExists Then
MessageBox.Show("Device Found")
Else
MessageBox.Show("Device Not Found")
End If
End Function
Posted 02 October 2008 - 09:18 AM
japie, on 2 Oct, 2008 - 09:39 AM, said:
