Way To Determine When A Fiel Is Accessed?

Nov 20, 2008

I currently have an application that uses the FileSystemWatcher object and events to monitor activity in a selected folder. this works great for detecting files being copied to or created in the folder, moved or deleted and changed, however, I am trying to determine if a file is accessed (opened) regardless of if it is modified. One of the NotifyFiler options is LastAccess. It appears that this fires an event, however, it always seems to be the Modified event. I would like to be able to keep track of file access and modification separately. I currently store the activity in a listbox and also in a richtextbox where the text color illustrates the type of activity.Does anyone know how to accomplish determination of file Access versus file Modification?I have included some of my FilesystemWatcher code below.

Code:
Private Delegate Sub AddActivityTextDelegate(ByVal sActivityText As String, ByVal cColor As System.Drawing.Color)

[code]......

View 2 Replies


ADVERTISEMENT

Opening A Solution File It Was Saying "The Selected Fiel Is Not A Valid Solution File"?

Mar 27, 2012

Till yesterday I was working fine with my Project.I din install anything new, am not trying to open my solution file with a different version also.Today when i tried opening my solution, it was saying

"The Selected Fiel is not a valid solution file"

"The Operation could not be completed.Unspecified Error"

Microsoft Visual Studio Solution File, Format Version 10.00

# Visual Studio 2008

Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "??E", "..Setup2Setup2.vdproj", "{600F8FB2-B9A9-4138-B7E7-FE7B39815CC1}"

EndProject[code].....

View 6 Replies

How To Know Who Accessed Computer

May 26, 2010

We have lots of security policies in place and many people (or process) have the privilege to access anyone's computer. Is it possible to tell who access and when and what folder was accessed? I know eventlog has lots of entries you can check, but in terms of what folder was accessed, is it possible?

View 1 Replies

.net - Mysql Database That Can Be Accessed Over A Vpn?

Mar 23, 2010

I have 2 computers. Both with w7 as os. I have installed wampserver on one of them.I have mysql database on wampserver.Then I have made a vb.net program to connect to mysql database. I have put the program on both computers.What I want to do is for those two programs to see the same database that is on one computer. For them to be able to add, delete, update that 1 database. How do I do that? How do I network the mysql database? Do I also have to install wampserver on the other computer?What do I do

View 1 Replies

Deleted Row Information Cannot Be Accessed Through The Row?

Dec 1, 2007

I'm getting an exception with the message "Deleted row information cannot be accessed through the row".

I already searched from similar questions but so far i wasn't able to find the solution for my problem.

The exception happens in the line

Code Block

View 4 Replies

DLL That Is Accessed During The Installation Of The Program?

Dec 4, 2009

Computer.FileSystem.FileExists(Environment.GetFolderPath(ProgramFiles) to get the Program Files directory in my application. The problem is that when running on a 64 bit version of Windows 7, I am getting the Program Files (x86) directory, not the 64 bit directory. As far as I can tell, everything is compiled as 64 bit.This code is actually in a DLL that is accessed during the installation of the program.

Is there any way to get the 64 bit path?

View 2 Replies

Get Last Accessed Directory Path?

Oct 20, 2009

I want to get the last accessed directory path, what code should I use? The directory path I mean is just like when we use OpenFileDialog, default path of it is the last folder we accessed. I've tried to search but get no result.

View 4 Replies

Check If An IEnumerable Is Being Accessed Using A For Each Loop?

May 19, 2009

Suppose I have an IEnumerable such as a List(TValue) and I want to keep track of whether this list is being accessed (to prevent issues with, say, adding to the list while it is being iterated over on a different thread); I can always write code such as the following:

Dim List1 As New List(Of Integer)
Dim IteratingList1 As Boolean = False
' ... some code ... '

[Code]....

(I realize this code is very arbitrary, but it illustrates what I'm talking about.)

My question is whether there's a better/cleaner way to perform this check than by manually updating and accessing a Boolean, as above. I feel like there must be, but, to my knowledge, there isn't any IEnumerable class with a built-in "I am being iterated over" method or property. And writing a new class that implements IEnumerable and contains such a property seems like overkill to me.

View 3 Replies

Find Program When Accessed To Folder?

May 3, 2012

How I can find program when accessed to folder... I know it show what file created, but I wish know WHICH program accessed to folder not what is created in folder !

View 14 Replies

List (Of T) Items Accessed By Index Or By Name?

Oct 17, 2011

I want to build my own class. In it, I need to recreate a behavior we can see in DataTable and in some other places : accessing items by their name or by their index. [code]...

View 5 Replies

List(Of T) Where Items Can Be Accessed By Index Or By Name

Oct 17, 2011

I want to build my own class. In it, I need to recreate a behavior we can see in DataTable and in some other places : accessing items by their name or by their index. How can I reproduce such a behavior. Here's what I mean :

[Code]....

View 2 Replies

Track Most Recently Accessed File?

Jul 21, 2011

I am developing an application in VB.NET. in which I need to open the most recently accessed file (i.e. last accessed file in the previous session) when the application starts. One approach is to save the location of the most recently accessed file in a text file and read it when the application runs the next time.

View 2 Replies

Where Is MS Reports Log Files Located And Accessed

Dec 28, 2011

I have two MS Reports with each their own dataset.The first one works but the other does not fill anything in it's table. When I debug the dataset, just before showing the Report, it's fill, and I did the same setup as with the first report.I get no errors og other input.. The table just not show any rows at all. Is their any log files that can tell me something and if so, where can I find them?

View 2 Replies

.net - Enforcing Using The Class Name Whenever A Shared Member Is Accessed?

Jan 20, 2010

We have a coding standard that says all shared (static) fields and methods must be called with the class name. E.g. NameOfClass.whatever Is there a tool that we can use to check this is in fact the case? (Likewise for modules) I should have make it clearer we are using VB.NET.

[Code]...

View 5 Replies

Force Program2008 Function To Only Be Accessed Via Events?

Oct 15, 2009

I want some event handling functions to only be able to be accessed via raised events and not called from the program.[code]...

Is there a declaration or some other way to accomplish this?

View 2 Replies

Image Added To App Not Being Accessed When App Is Installed Via ClickOnce

Apr 11, 2010

I have some jpeg images that are added to my application. The Copy To Output Directory property is set to Copy Always. Running from Visual Studio the images are accessed and if I install the application to a drive on my computer directly the images are accessed but if I publish my application to my web site and install via the publish.htm page then the images are never accessed regardless of what I have the Build Action set to.

If the Build Action is set to Content then it won't even install because I get an error that says the computed hash for the images doesn't match the manifest. I've tried all the different Build Action options without success. For Build Action = None, Compile and Embedded Resource I don't get the error I do for Content but the jpeg images aren't accessed. [code]....

View 1 Replies

Release An External Drive After It's Been Accessed By My Program?

May 23, 2011

The VB.Net program in question creates several files, adds them into a zip file (using DotNetZip), and saves the zip file into a given directory (which the user chooses). This comes out just fine. But when I use it to save directly to my USB flash drive, I can't eject the drive without shutting down the program first.I've tried disposing the zip object (from the DotNetZip library), doesn't work. I also tried setting FileIO.FileSystem.CurrentDirectory to somewhere else on the machine, still no.

View 1 Replies

Write A Class Where A Property Can Be Accessed Without Naming It?

Mar 29, 2010

[code].....

View 1 Replies

Error : CtlTest Was Accessed From Another Thread To The One It Was Created On That Line

Sep 13, 2010

On the new of a form i create a control by going:

MyControl = New ctlTest

but it errors saying that ctlTest was accessed from another thread to the one it was created on that line...The control starts a thread on the new event of it that draws on the control - now i know that the thread itself works because when i put a button on the control to start the thread it works..

View 2 Replies

FileSystemWatcher ...return The Actual User Who Accessed The File?

Dec 16, 2010

I am working on a file access monitor wrapped up in a VB .Net Class. The ileSystemWatcher is working and my log file shows files when they are accessed. However, I am having trouble returning who or what accessed the files. For example....system services and processes should return something like NT-ATHORITYSYSTEM while a network share being accessed by another computer should return DOMAINUSERNAME and finally a process running in the background via "Switch User" should be returned as DOMAINSOMEOTHERUSER ....anybody have any ideas? I have searched high and low and have found nothing but other people asking the same question and people saying how it is not possible. the Sysinternals Process Monitor is able to output the correct results and its documentation states it was created using NET API however I can not find any references to any such API calls or combination of such. Should I be using something else other than the FileSystemWatcher? My code is below

View 3 Replies

Find File By Extension And Last Accessed Time And If Possible User Id

Dec 6, 2011

I am brand new to VB and been advised it might be the best thing to use for my problem, so here goes. I need to be able to scan a machine for all excel and access db files and list them by name and last accessed time. I would like to be able to do this in bulk so more than 1 machine at a time but thinking it my be best to do each machine seperately.

When I have the data I need it to be exported in a list to either excel or a text file or anything really. Als if possible how would I add the machine name to the list so I know which one i have scanned. I have been searching the forums and google but think I am getting more confussed as this is a whole new world for me.

View 5 Replies

Visual Basic IO Exception: File Cannot Be Accessed Because It Is Being Used By Another Process

May 20, 2012

I have been searching throughout the forums and have yet to find an answer that will work for resolving the above problem in my program The exception is occurring within the declaration of a new streamwriter and after the closing of a previously used streamreader that accessed the same file I'm trying to write to. I think that the file is completely closed at the end of the streamreader block, but I cannot tell for sure.

This bit of code is the block just before the streamwriter declaration and the declaration itself:

Dim fn As Integer = 1 'first number for searching for file

[Code]...

If you need more info or more code chunks to help solve the problem, feel free to ask

View 4 Replies

VS 2010 How To Check Whether Files Are Being Accessed Before Do Directory.Delete

Apr 5, 2012

I'm copying over some files to a target directory on a daily basis.Before I move the new files over, I'd like to delete the old files under the target folder, possibly using System.IO.Directory.Delete()But my problem is, the target folder is on a public drive where everybody in the company could access, and I don't want to empty the folder while someone else might be using those files.I'm thinking whether there's a Class that check the status on the files in a specific directory before I come in and delete everything.(I know I would get an IOException if I disregard the status of the files and try to delete them)

View 2 Replies

WebServices Giving Errors When Accessed Directly From The Browser?

Jul 15, 2011

I have the following web-service which works perfectly as long as it is accessed from a clientside script (javascript, jquery)

<%@ WebService Language="VB" Class="WebService" %>
Imports System.Web.Script.Services
Imports System.Web.Services

[code].....

View 1 Replies

Windows - Close A .NET Application That Is Accessed By Multiple PC On The Same Connection?

Jun 7, 2012

I have an application that I made in VB.NET. I put it in the server on my office and every other user access it via network connection. I only mapped the drive onto their computer and then I cope the shortcut to the application. can I close all the application that is running with a single code? I sometime need to close all the application first before I can do anything with the application (for example, modifying the report etc.). My current method is still the manual one, which is calling everyone to close their application or running all over the place closing the application myself.

View 1 Replies

Cross-thread Operation Not Valid: Control 'Panel1' Accessed?

Nov 3, 2011

This is the error message I am getting:"Cross-thread operation not valid: Control 'Panel1' accessed from a thread other than the thread it was created on."Now I know there have been some topics similar to this but they didn't really and most were confusing.The reason I am getting this error is because I am opening up a new form and then calling these three things:

Panel1.Show()
Label1.Show()
Label2.Show()

[code].....

View 2 Replies

Function Accessed By Multiple Threads With Parameter Passed By Reference

Apr 29, 2011

I am in vb.net and have a function that will be accessed by multiple threads. Everything inside the function uses local variables. However, each thread will pass in its own dataset by reference. From what I have read the local variables should be no problem, but I think the dataset coming in is a concern. How should I control access / execution of this function to make sure that it is thread safe?

View 1 Replies

Homework - .Net - Inheritance - Parent And Child Both Have ToString Methods? Can Both Be Accessed / Used?

May 28, 2012

I am learning inheritance in VB.Net. A homework assignment asks me to write a base class with a name (String) property and a ToString method that displays the name. It also asks me to create some child classes of the base class and also implement a ToString method in those child classes. Is it possible for me to call the ToString method from both the child and base class?

[Code]...

Again, I am wondering if there is a way to call the ToString() method within the child class and then base class to generate output something like: "Hello VB.Net This is the name"

View 1 Replies

"Cross-thread Operation Not Valid: Control 'TextBox1' Accessed From A Thread?

Sep 18, 2009

When i run the program i am getting the following error in this line TextBox1.Text &= "File Created: " & FullPath & vbCrLf"Cross-thread operation not valid: Control 'TextBox1' accessed from a thread other than the thread it was created on."

View 13 Replies

Cross-thread Operation Not Valid Control 'FormSplash' Accessed From A Thread Other?

Sep 5, 2009

I need your help on the following. In debugging mode only the program is stopping to the following line "My.Forms.FormMain.HelpProviderMain.HelpNamespace = "Reports.chm"" with the following error ""An error occurred creating the form. See Exception.InnerException for details. The error is: Cross-thread operation not valid: Control 'FormSplash' accessed from a thread other than the thread it was created on.""

I noticed that when I am putting NONE in SPLASH screen option in the properties of the project, there is no problem.I am no familiar with treating that's why can you give me detail instruction how to overcome this annoying problem?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved