|
-
January 9th, 2003, 10:27 AM
#1
Object Collection?
Hi
Is there a way to iterate through objects in a Form like through controls collection?
dim ctrl as control
for each ctrl in controls
debug.writeline(ctrl.gettype.tostring)
next
Thanks
-
January 9th, 2003, 10:33 AM
#2
Well.... I guess your code just did it.... as the controls added to the form is the objects of your form.
/Leyan
Last edited by Athley; January 9th, 2003 at 10:55 AM.
-
January 9th, 2003, 10:57 AM
#3
no it does not do it,
What i need to do is to be able to monitor the filesystem for changes in different directories. maybe i'm not doing it proper way but i need to have it done quickly....
Code:
Private Sub addWatcher(ByVal strPath As String, ByVal strFilter As String)
fsWatcher1 = New System.IO.FileSystemWatcher(strPath, strFilter)
Dim obj As Object
fsWatcher1.EnableRaisingEvents = True
'fsWatcher1.IncludeSubdirectories = True
AddHandler fsWatcher1.Changed, AddressOf fsEventHandler
Debug.WriteLine(fsWatcher1.GetType)
End Sub
Private Sub fsEventHandler(ByVal sender As Object, ByVal e As System.IO.FileSystemEventArgs)
MsgBox(e.FullPath)
End Sub
it creates a filesystemwatchers that work. but now i need to write a sub that will dispose of all watchers created with this sub
-
January 9th, 2003, 11:22 AM
#4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|