Click here to Skip to main content
15,886,026 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Can anyone Direct me to how to change Windows 'Settings' programmatically? Pin
Member 331739318-Jul-18 11:29
Member 331739318-Jul-18 11:29 
GeneralRe: Can anyone Direct me to how to change Windows 'Settings' programmatically? Pin
Mycroft Holmes18-Jul-18 14:16
professionalMycroft Holmes18-Jul-18 14:16 
QuestionUSING FSWATCHER TO MONITOR FILES COPIED TO ALL EXTERNAL DRIVES Pin
Member 1390609010-Jul-18 22:55
Member 1390609010-Jul-18 22:55 
AnswerRe: USING FSWATCHER TO MONITOR FILES COPIED TO ALL EXTERNAL DRIVES Pin
Jochen Arndt10-Jul-18 23:49
professionalJochen Arndt10-Jul-18 23:49 
GeneralRe: USING FSWATCHER TO MONITOR FILES COPIED TO ALL EXTERNAL DRIVES Pin
Member 1390609011-Jul-18 0:15
Member 1390609011-Jul-18 0:15 
GeneralRe: USING FSWATCHER TO MONITOR FILES COPIED TO ALL EXTERNAL DRIVES Pin
Jochen Arndt11-Jul-18 0:35
professionalJochen Arndt11-Jul-18 0:35 
GeneralRe: USING FSWATCHER TO MONITOR FILES COPIED TO ALL EXTERNAL DRIVES Pin
Member 1390609011-Jul-18 4:07
Member 1390609011-Jul-18 4:07 
GeneralRe: USING FSWATCHER TO MONITOR FILES COPIED TO ALL EXTERNAL DRIVES Pin
Jochen Arndt11-Jul-18 7:06
professionalJochen Arndt11-Jul-18 7:06 
I had nothing in mind. It is your project and you should know what you want to do.

But think about this:
Is it logical to call watchers.Add(watchfolder) first and then set the watchfolder properties?

If you - as a beginner - use existing code as base and want to modify it, it is essential that you understand what the existing code is doing. Then define your requirements (here: multiple watchers) and think about how this can be done (I suggested a list but there are also other solutions like an array).

Also always read the documentation of the used functions and classes. It helps understanding what the function is doing, contains usually example code, and often - most important - notes about what must be considered when using it. Here it is for example (as already noted by Dave):
Quote:
The Windows operating system notifies your component of file changes in a buffer created by the T:System.IO.FileSystemWatcher. If there are many changes in a short time, the buffer can overflow. This causes the component to lose track of changes in the directory, and it will only provide blanket notification. Increasing the size of the buffer with the P:System.IO.FileSystemWatcher.InternalBufferSize property is expensive, as it comes from non-paged memory that cannot be swapped out to disk, so keep the buffer as small yet large enough to not miss any file change events. To avoid a buffer overflow, use the P:System.IO.FileSystemWatcher.NotifyFilter and P:System.IO.FileSystemWatcher.IncludeSubdirectories properties so you can filter out unwanted change notifications.
So watching a complete drive - especially the system drive - will not work as expected.
AnswerRe: USING FSWATCHER TO MONITOR FILES COPIED TO ALL EXTERNAL DRIVES Pin
Dave Kreskowiak11-Jul-18 3:18
mveDave Kreskowiak11-Jul-18 3:18 
GeneralRe: USING FSWATCHER TO MONITOR FILES COPIED TO ALL EXTERNAL DRIVES Pin
Member 1390609011-Jul-18 4:06
Member 1390609011-Jul-18 4:06 
GeneralRe: USING FSWATCHER TO MONITOR FILES COPIED TO ALL EXTERNAL DRIVES Pin
Dave Kreskowiak11-Jul-18 5:14
mveDave Kreskowiak11-Jul-18 5:14 
AnswerRe: USING FSWATCHER TO MONITOR FILES COPIED TO ALL EXTERNAL DRIVES Pin
mo149211-Jul-18 5:55
mo149211-Jul-18 5:55 
GeneralRe: USING FSWATCHER TO MONITOR FILES COPIED TO ALL EXTERNAL DRIVES Pin
Eddy Vluggen13-Jul-18 0:51
professionalEddy Vluggen13-Jul-18 0:51 
QuestionVisual Basic Codes 6.0 Pin
Asheeledio5-Jul-18 23:32
Asheeledio5-Jul-18 23:32 
AnswerRe: Visual Basic Codes 6.0 Pin
Richard MacCutchan5-Jul-18 23:36
mveRichard MacCutchan5-Jul-18 23:36 
AnswerRe: Visual Basic Codes 6.0 Pin
Chris Quinn5-Jul-18 23:41
Chris Quinn5-Jul-18 23:41 
AnswerRe: Visual Basic Codes 6.0 Pin
Dave Kreskowiak6-Jul-18 13:48
mveDave Kreskowiak6-Jul-18 13:48 
Questioncan't connect to finger print scanning device from windows server 2003 Pin
Meax5-Jul-18 0:36
Meax5-Jul-18 0:36 
AnswerRe: can't connect to finger print scanning device from windows server 2003 Pin
Richard Deeming5-Jul-18 1:38
mveRichard Deeming5-Jul-18 1:38 
GeneralRe: can't connect to finger print scanning device from windows server 2003 Pin
Meax5-Jul-18 8:06
Meax5-Jul-18 8:06 
Questionhow to highlight dates of Month Calendar from database windows form Pin
Meax2-Jul-18 20:01
Meax2-Jul-18 20:01 
AnswerRe: how to highlight dates of Month Calendar from database windows form Pin
Richard MacCutchan2-Jul-18 21:08
mveRichard MacCutchan2-Jul-18 21:08 
GeneralRe: how to highlight dates of Month Calendar from database windows form Pin
Meax2-Jul-18 22:19
Meax2-Jul-18 22:19 
GeneralRe: how to highlight dates of Month Calendar from database windows form Pin
Richard MacCutchan2-Jul-18 22:20
mveRichard MacCutchan2-Jul-18 22:20 
AnswerRe: how to highlight dates of Month Calendar from database windows form Pin
Richard Deeming3-Jul-18 0:48
mveRichard Deeming3-Jul-18 0:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.