Liszt 23 Junior Poster

I have made a Form application that contains of 2 Forms.
In these 2 Forms I have added controls and a lot of code behind.

How will I "Close the code" to this project so no one can open it and see all my code that I have done.

I have heard the expression "Close the code" many times but what does this meen and how will I do to do this ?

Liszt 23 Junior Poster

Ok, I am trying to do it like this:

ShellExecute(nullptr, "open", "http://www.microsoft.com", nullptr, nullptr, SW_SHOWNORMAL);

The compiler says:
SW_SHOWNORMAL : undeclared identifier
ShellExecute : identifier not found

I am not sure if I need to #include or use any special namespace in order to use ShellExecute or what I could be doing wrong ?

use shellExecute.

Liszt 23 Junior Poster

How would it be possible to code inside a button that the Browser will open and go to address:
http://www.google.com


private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
{


//Code here to go to: http://www.google.com ?


}

Liszt 23 Junior Poster

I use Visual Web Developer 2008 and I wonder.

If you look at this webpage as you are reading on now at the very top.
You can see that <DANIWEB> Control Panel Donate etc.. is like a yellow picture.

Question is:
If this is a yellow picture wich I can do in photoshop also, how would I insert this picture.
Could I do that in a panelcontrol ?

I think I have managed to do that but the real question is if you change the Width of this window by draging it to the Left and Right, you can see that the whole White area that is going from top to bottom of the page also is moving Along when you do that.

How is that possible to do because when I add such picture in a panel, the picture is Fixed in one place when I change the Width by dragging it to the left and right. The picture does not move along ?

Liszt 23 Junior Poster

Yes that did work.
Thanks alot !

Liszt 23 Junior Poster

I use Visual Web Developer 2008 and have just started out a project.

When pressing F5 that compiles the project the program opens a blanc Explorer window.

What I now wonder is how it is possible to make this whole window to be completely Black instead.
I am searching the properties like I do when programming in C# but I cant really find any type of "BackColor" property here.
Wonder if anyone could have any idéa... ?

Liszt 23 Junior Poster

Sorry, I just saw now when clicking around on godaddys site that ASP.net was supported.

However I have purchased a Domainadress and now I also need to purchase a Hosting wich is another thing in order to upload my files to my Domainadress.

I think I am getting this now ?
It is a new process so I just need to get all steps in order to understand how this works.

Liszt 23 Junior Poster

Yes that was the way I wanted to do.
It did work fine using the property: 'PostBackURL' for the button
and put the address there.
Thank You!

Liszt 23 Junior Poster

You are right, I have only purchased the domainname.
So hosting is also something I need to purchase then. I didn´t know that. Good to know that now.

When looking at their page where they show what they support for the hosting http://www.godaddy.com/gdshop/hosting/shared.asp?ci=9009

They have something called: Microsoft. net
I wonder if this is 'the same' as ASP.net or if it will work with this or if any of the other supported will work with ASP.net ?

That would be more than nice to know before I really start out building the webpage.

Have you purchased Hosting or just the domain name?

If so you need to check if your host supports ASP.net else your projects will not work.

If they do they will provide a backend to setup a web application.

Liszt 23 Junior Poster

I am using "Microsoft Visual Web Developer 2008 Express Edition".

I have created a First page with a button and 2 textBoxes( see attached file)

In my project I have added a new item/Page 2 to this project.

What I now is trying to do or wonder how it is possible, is how to open this Page2 when pressing this button.

Normally when you do this in C# you would have done something like this to open a new Form. Is the solution something simular to this ?

Form2 form2 = new Form2();
form2.Show();
Liszt 23 Junior Poster

I see, I am new to this, so I beleive this will be my first step to do.

As I understand, the UserName and Password is something I get from in my case: GoDaddy where I purchased my DomainName and the files that I will upload is the Folder/"Project" where all the files is saved in when writing my webpage.

I have downloaded a FTP software (Fling) and think I have understand the process to choose the folder where my Project files are.
The only thing is my UserName and Password wich I have done a request for to them.
I hope I am on the right track ?

just search for an ftp software, the are many of them and the are free
then you access the server through the user-name and password which you already has it.

Liszt 23 Junior Poster

Thanks for answer :)
I think I have to ask what ftp:// really meens or is.

1. Do I connect to a Server online by typing ftp://abc.com that are connected
to my Domain www.abc.com ?


2. When I write ftp://abc.com in Internet Explorer, I get a MessageBox that says:

"Windows cannot access this folder. Make sure you typed the file name correctly and that you have permission to access the folder

Details:
The operation timed out"

Should anything come up by typing in ftp://abc.com ?

I've never used WebDeveloper but to put your pages up to view on a website you can FTP your site, and there are also applications to download that are more secure for file transfer.

But open up windows explorer, and type in

ftp://abc.com

Then there's your web space. Copy your web page over and then to view it online the directory will be like www.abc.com/AmazingWebpage

Liszt 23 Junior Poster

I am an absolute beginner when it comes to create WebSites and are perheps out to catch some basic knowledge of the steps of creating a page etc...
I am not a beginner in C# and C++ and know these languages Well.

I have downloaded Visual Web Developer 2008 Express Edition where I can use my C# skills.

* For example I have purchased a DomainAdress already:
http://www.abc.com //Example

* I have created a test-WebSite in Web Developer like this:
// Only a button and 2 textBoxes for a test

protected void Button1_Click(object sender, EventArgs e)
    {
        TextBox2.Text = TextBox1.Text;
    }

Now is my question. I can run this WebSite through F5 on my computer but I dont know how I will connect this WebSite with my purchased adress so others can access it ?
This is my question. What do I need to do this ?

Thanks a lot

Liszt 23 Junior Poster

Try to open the ToolBox and rightclick the surface. You should have any choise where you can add/remove items.

Then somewhere here you will be able to Browse you .DLL and choose it to your toolbox.

Liszt 23 Junior Poster

Ancient, Thank you. I will read this articles and see if this gets me
some idéas of how to reduce the flickering.


Maybe this article will give you some hints on how to correct it. Also search that site for "flickering" because I found several other articles on that topic that may or may not be of interest to you.

Liszt 23 Junior Poster

I have put about 30 trasparent buttons on a Form wich meens that all these buttons are invisible.

When I open this Form, you will see all these trasparent/ invisible buttoncontrols "flicker" in a white color. This flickering process takes about 2 seconds until the Form is 'ready'.

What does this depend on because I had the same problem with many forms and projects I have done.

What could be done about to avoid "Visually flickering" of the controls when updating/opening the Form ?

Greatful for any tips and help!

Liszt 23 Junior Poster

I am not sure if this could solve it in the constructor of the button.

// Draw the button's border.
e->Graphics->DrawEllipse(System::Drawing::Pens::Transparent, newRectangle);
Liszt 23 Junior Poster

Try this:

#include "Form2.h"


Form2^ newform2 = gcnew Form2;
newform2->ShowDialog();
Liszt 23 Junior Poster

Now I can see the code. If I delete my project in the Visual Studio2008/Projects and just put the project I got from you and open the project under "Recent Projects" then my deleted project is loaded, very strange ? So I saw my old project and not yours.
But I did open it manually and now I can see what you did. As I am quite new to this I have to ask what is ment by this.

>> It still has link problems for unresolved external functions, but you just have to implenent them in the *.cpp files.

What is "unresolved external functions" ?
Sorry for all these questions but I find it difficult as it is so many things that has to be moved and put in order to "just" get this function to work.

As the project get these errors:
1>Form4.obj : error LNK2005: "private: class Form1::Form4 ^ __clrcall Form1::Form3:: SomeMethodA(void)" (?SomeMethodA@Form3@Form1@@$$FA$AAMP$AAVForm4@2@XZ) already defined in Form3.obj

1>Form4.obj : error LNK2020: unresolved token (06000004) Form1.Form4::button1_Click
1>Form3.obj : error LNK2020: unresolved token (06000004) Form1.Form4::button1_Click
1>Form2.obj : error LNK2020: unresolved token (06000004) Form1.Form4::button1_Click
1>Form1.obj : error LNK2020: unresolved token (06000004) Form1.Form4::button1_Click
1>C:\Documents and Settings\Andreassss\My Documents\Visual Studio 2008\Projects\Form1\Debug\Form1.exe : fatal error LNK1120: 4 unresolved externals

didn't you look at the code I gave you????

ref class Form4;
ref class Form3
{
public:
	Form4 ^SomeMethodA();
};

take that out of the *.h files because it isn't needed.

Liszt 23 Junior Poster

I appreciate the effort on this help but there is to many problems for me to localize how this really will be done.
I have managed to do one more thing and that is to move ths class code for Form3.h and Form4.h to the End of the .h files wich made it possible to now see the designView of these 2forms and it compiles.
I have put this code after the FormClass in the End of the .h files instead of before the FormClass in the beginning of the .h files:

ref class Form4;
ref class Form3
{
public:
	Form4 ^SomeMethodA();
};

But if I will move the implemenation of button1_Click() from Form3.h to Form3.cpp like this, I will have compileerrors:
'button1_Click' : undeclared identifier
'button1_Click' : is not a member of 'Form1::Form3'
'System::EventHandler' : a delegate constructor expects 2 argument(s)

#include "stdafx.h"
#include "Form3.h"
#include "Form4.h"

Form4 ^Form3::SomeMethodA()
{
return gcnew Form4;
}

using namespace Form1;

private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) 
{
 	  Form4 ^form4 = gcnew Form4;
	  form4->Show();
}

I have attached a new .zip where the designView now can be seen.
One more thing is that the compiler doesn´t produce any .exe file when it compiles fine where I can run the program but this is perheps because of something that isn´t correct anyway that it compiles.

move the implementation of button1_Click() from Form3.h to Form3.cpp. Attached are new files. It still has link problems for unresolved external …

Liszt 23 Junior Poster

Thank You, I have zipped the project, the object files only took 18 kB unzipped so I left them there in case anyway.
I removed a file named: VC++ Intellisense DataBase wich took up 10.9 MB of memory.
It was not possible to upload the file with this in the folder.
I hope I am sending the project correctly.

zip up the project minus object files and post it so that we can see what the problem is.

Liszt 23 Junior Poster

I didn´t understand that it was the projectname I should have written, sorry for that.
My projectname is simply "Form1" as in your testprogram "testform"
So now I guess I have written the *.cpp files correct. But still there is errors.

Form3.cpp

#include "stdafx.h"
#include "Form3.h"
#include "Form4.h"

Form4 ^Form3::SomeMethodA()
{
return gcnew Form4;
}

using namespace Form1;

Form4.cpp

#include "stdafx.h"
#include "Form3.h"
#include "Form4.h"

Form3 ^Form4::SomeMethodB()
{
return gcnew Form3;
}

using namespace Form1;

Exactly the same compileerror situation occurs anyway with this in place but I
will only have these compileerrors if I use these codes that would open eachothers
forms and the compiler only gives errors for Form4 and not Form3:
I dont know if there could be any more clues to the error.

'Form4' : no appropriate default constructor available
use of undefined type 'Form4'
left of '->ShowDialog' must point to class/struct/union/generic type


Form3.h

Form4 ^form4 = gcnew Form4;
form4->ShowDialog(); //open form4

Form4.h

Form3 ^form3 = gcnew Form3;
form3->ShowDialog(); //open form3
Liszt 23 Junior Poster

Okay, thank you. In your testprogram, did you try to open eachothers forms
or just compiling the code without the code that open forms ?

I could wonder what this meen. using namespace <namespace name>; If I use that line in the *.cpp files, I will have the errors:
1>.\Form3.cpp(5) : error C2059: syntax error : '<'
1>.\Form4.cpp(6) : error C2059: syntax error : '<'

If I dont use the using namespace <namespace name>; line and dont use the codes that will open eachothers forms, it will compiles fine. I dont know what this leaves the problem or solution.


I think in the *.cpp implementation files you need to add using namespace <namespace name>; . That made it work in my test program.

Liszt 23 Junior Poster

That shouldn´t be a good idéa so I get over many examples how to go around this problem.
In somehow I have to use any form of a forward declaration. This is my code so far.

Still I have the compilerror for:
'Form22' : no appropriate default constructor available

I have followed an example but are not defenetive of what is going on in this code and would greatly appreciate any guidance in the code in order to really understand it.


Inside Form3.h

ref class Form4;
ref class Form3
{
public:
	Form4 ^SomeMethodA();
};

Inside Form3.cpp

#include "stdafx.h"
#include "Form3.h"
#include "Form4.h"

Form4 ^Form3::SomeMethodA()
{
return gcnew Form4;
}

Inside Form4.h

ref class Form3;
ref class Form4
{
public:
	Form3 ^SomeMethodB();
};

Inside Form4.cpp

#include "stdafx.h"
#include "Form3.h"
#include "Form4.h"

Form3 ^Form4::SomeMethodB() //SomeMethodB is not found as a member ?
{
return gcnew Form4;
}

because you have recursive includes -- form3.h includes form4.h which includes form3.h ...

Not a good idea, as you have found out.

Liszt 23 Junior Poster

Why does I encounter a compileerror when doing this.

Compile error says.
'Form3' : undeclared identifier
'Form4' : undeclared identifier

Inside of Form4.h:

#include "Form3.h"

Form3 ^form3 = gcnew Form3;
form3->ShowDialog();

Inside of Form3.h:

#include "Form4.h"

Form4 ^form4 = gcnew Form4;
form4->ShowDialog();
Liszt 23 Junior Poster

I have a ThirdPart program that appends text to a file randomly. I dont know how this code is doing this, thinking of opening and closing the file.

I have simulated that scenario by:
//Process 1 Appends Text to File
//Process 2 Reads Text From File


Now I am writing a code that will be able to Read this same file.
In the code below, both for the appending to file and read to file, I dont ->Close() the files.
(If I close the files, it will work, but this is happening in a following order)

If I run this code the reading code will tell that the file cannot be red because it is used by another process(appending process).

So my question is.
How could it be possible for these 2 processes to append and read to the file even if the file is used by the other process.
Like even if the code is appending to the file(ThirdPart Program), I will have the oppurtunity to read from the file anyway at the exact same time.

Perheps my question is that I want to be able to read a file that is used by another process ?

//Process 1 Appends Text to File

FileStream^ sb = gcnew FileStream("C:\\test1.txt", FileMode::Append);
StreamWriter^ bk = gcnew StreamWriter(sb);

bk->WriteLine("textString");
bk->NewLine;




//....................................................................
//Process 2 Reads Text From File

     StreamReader^ sr = gcnew StreamReader("C:\\test1.txt");
     String^ Line;

      while( sr->Peek() >= 0 ) …
Liszt 23 Junior Poster

Then I know what to search for,
Thanx for your assistance.

Liszt

Something like
"ntp client c source code"
in your search engine perhaps?

Salem commented: Good job :) +23
Liszt 23 Junior Poster

Ok, that seems nice that it is possible :)
Do you have any idéas how I will begin, if there is any examples on this how to code.
Has MSDN any examples of this.
Is there any calls in C++ to do this.
It doesn´t seem to be a standard task you do in C++, so I have no code to start out this. What I will call, because I might need to call a timeserver perheps or something similar.

Like in the controlpanel in XP "Date and Time" you can synchronize the time on the computer with update now for example through: www.timewindows.com

Er, yes.

Liszt 23 Junior Poster

Thanks for the information. I have to ask though here.
It don´t seem that there is any info about how to code this in C++.
Is this a possibility to do..?

Liszt 23 Junior Poster

How could it be possible to synchronize the computertime to ex: GMT or any timeserver on the internet ?

Liszt 23 Junior Poster

I try to get the events working in the datagrid for this.

With this code I change BackColor from black to MediumSeaGreen.

dataGridView1->Rows[3]->Cells[10]->Style->BackColor = Color::MediumSeaGreen;

When the BackColor is changed, should´t this messagebox appear ?
It doesn´t. I have also tried the event BackgroundColorChanged.

private: System::Void dataGridView1_CellStyleChanged(System::Object^  sender, System::Windows::Forms::DataGridViewCellEventArgs^  e) 
{
	 MessageBox::Show("BackGroundColor is changed");
}
Liszt 23 Junior Poster

ddanbe.. thanks..

This did it:

dataGridView1->Rows[1]->Cells[10]->Style->Font = gcnew System::Drawing::Font(L"Arial", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point);
Liszt 23 Junior Poster

Okay, Thank you, I am not sure how to set something like this.

For this scenario, what is the method to achieve this and do I set both the font and size at the same time then ?

Liszt 23 Junior Poster

What is the way to change size in a cell in dataGridView to 8.25
This does not seem to work.

dataGridView1->Rows[b]->Cells[10]->Style->Font->Size = Font->Size(8.25F);
Liszt 23 Junior Poster

I use the _Changed event and NotifyFilter "LastWrite".

When opening the Form that contains the fileSystemWatcher the processor will in about 15 seconds go upp to 50% constantly, looking in TaskManager.
No events is fired here yet, so I wonder why this is happening.

Anyone that has a clue about this, Should this be the case since it is an event ?

Liszt 23 Junior Poster

I use the _Changed event and NotifyFilter "LastWrite".

When opening the Form that contains the fileSystemWatcher the processor will in about 15 seconds go up to 50% constantly.
No events is fired here yet.

Anyone that has a clue about this, Should this be the case since it is an event ?

Liszt 23 Junior Poster

I am searching for a way to change the backgroundcolor of a specific cell to red and the back to black again.

With this code sometimes almost all cells is blinking because I have to use Application:: DoEvents to update the BackColor.

How can I change this like this without causing the 'blinking' ?

dataGridView1->Rows[5]->Cells[2]->Style->BackColor = Color::Red;
Application::DoEvents();

Thread::Sleep(100);

dataGridView1->Rows[5]->Cells[2]->Style->BackColor = Color::Black;
Application::DoEvents();
Liszt 23 Junior Poster

sorry my fault.. I think I forgot the .c_str();
Try and change to this instead:

int Num = 0;

Num = atoi(str.substr(1,2).c_str());
Liszt 23 Junior Poster

I am not sure what you meen but if you have the string:

string str = "X04030812$"


and for example want to substring "04" you can do:

str.substr(1,2);

Where 1 is the startingposition in the string and 2 is the length.
Then you can convert it to int:

int Num = 0;

Num = atoi(str.substr(1,2));

I dont know if this helps.

Liszt 23 Junior Poster

I have to doublecheck if this is the case.

When using the fileSystemWatcher in the application
where an event is checking for Changes in a file.
With just starting the application where no changes events is fired at all
the processor (AMD double core) Peeks at 50 % constantly.

Is this what happens when using the fileSystemWatcher ?

Liszt 23 Junior Poster

Thanx for this tips! I have worked out this test also using the ProcessMonitor.
Using this code it still executes twice.
I try to understand from the ProcessMonitorlog that I attached wich of the happenings that can occur the watcherevent to execute twice for "LastWrite" or/and what could be attached to this code to prevent perheps.

open(), write(), close()

ofstream o1;
o1.open("C:\\test\\trew.txt");

o1<< "hello";
o1.close();

LastWrite NotifyFilter for Path "C:\\test"
Below code executes 2 times. Should be executed 1 time only.

private: System::Void fileSystemWatcher1_Changed(System::Object^  sender, System::IO::FileSystemEventArgs^  e) 
{			 

ar = gcnew StreamReader("C:\\H.txt");			 
		 
String^ RLine;
			 
	while( ar->Peek() >= 0 ) 
	{
		RLine = ar->ReadLine();
	}
	 ar->Close();

}
Liszt 23 Junior Poster

I have to confirm how the buffersize is working for the fileSystemWatcher.
I have found this explanation on google:

The FileSystemWatcher class works by capturing all of the relevant file and older changes and placing them into a buffer.
This is then processed one change at a time until all of the notifications have been dealt with and the buffer is empty. By default, the internal buffer has a size of eight kilobytes (8192 bytes). Each event can take up to sixteen bytes of the buffer for its data, not including the file name.

For the line:
Each event can take up to sixteen bytes of the buffer for its data, not including the file name.

First as I understand the buffer works like a queue system where then each event takes up to 16 bytes of the default 8192 buffer.

*** What is it that takes up to 16 bytes, could an event take less than 16 bytes ?

*** 8192 bytes = (8192 / 16 bytes) = 512 changes in the buffer/queue ?

*** If one of these 512 changes is done, there will then be place for 1 more event in the buffer/queue ?

(This to understand if I might/could need to increase the internalbuffer)
Thank you

Liszt 23 Junior Poster

okay, I have tried out this way to put it to sleep for 1 millisecond and this works. I get no errors that the file is in use the second time the event is shoot.
My settings are:

GenerateMember True
Modifiers Private
EnableRaisingEvents True
Filter *.txt
IncludeSubdirectories False
NotifyFilter LastWrite
Path C:\TEST

private: System::Void fileSystemWatcher1_Changed(System::Object^  sender, System::IO::FileSystemEventArgs^  e) 
{
			 
Thread::Sleep(1); //1 millisec
	
String^ RLine;
ar = gcnew StreamReader(e->FullPath->ToString());

	while( ar->Peek() >= 0 ) 
	{
		RLine = ar->ReadLine();
	}
	 ar->Close();
}

What I do is that I open one file manually by clicking on it in the path "TEST".
Then I add some text, close the file manually and press Yes on saving the changes.
When I click Yes, this event is shooting and then put to sleep for 1 millisecond and then shooting again ?

As I have put the filter to "LastWrite" why does the event shoot 2 times because I limit it to just LastWrite and are not using the "LastAccess" also.
I have googled around about this and it seems to be a problem but cant find any solution or good explanation what really happens in this case.
How could the second shoot be prevented.

Liszt 23 Junior Poster

Thanx Narue, I have to check for some things here.

>> if the handler relies on having an exclusive lock, you'll get an error

What meens by this. What is an exclusive lock ?

>> treat the FileSystemWatcher like a timer. When it ticks, stop it long enough to do what you want to do, then start it again.

I wonder how these events is executing 2 times. I have tried to put a flag(rem) to not execute the event 2 times. I did this only to test how this works but I get the same error here that the file is in use by another process.

The question here though is that I wonder how the timer will work.
What is it that ticks ? Because I dont want to predefine a time where the event is 'dead' for taking in a LastWritten file event. This is what I wonder by "stop it long enough"
In somehow I want to use realtime flags that can block.

NotifyFilter is "LastWrite"

if( e->FullPath->ToString() != rem )
{
    //Read a file
}			 
rem = e->FullPath->ToString();
Liszt 23 Junior Poster

I am using the fileSystemWatcher and the _Changed event to indicate what file that was LastWritten to in a folder and then I want to read this file.
It seems that the code that I have below is executing twice and the second time the code runs I get this error message.
I have tried other type of code that also indicates that the code executes twice. ?

Why does the code execute twice though I want to just execute one time.
Second is even if the code is executing twice the file shouldn´t be used as I am closing it ? and there is no other process that use the file.

"The process cannot access the file 'C:\\F1\\t1.txt' because it is being used by another process"

private: System::Void fileSystemWatcher1_Changed(System::Object^  sender, System::IO::FileSystemEventArgs^  e) 
{
			
String^ RLine;
StreamReader^ ar;
ar = gcnew StreamReader(e->FullPath->ToString());

	while( ar->Peek() >= 0 ) 
	{
		RLine = ar->ReadLine();
	}
	 ar->Close();

}
Liszt 23 Junior Poster

Perheps

while (STAMINA || ENM_STAMINA != 0 )

never will be false if

ENM_STAMINA reduces by

ENM_STAMINA = ENM_STAMINA - 2;

as it was declared to 7.
In that case it will pass zero from +1 to -1 and therefore the loop will be infinite.

Liszt 23 Junior Poster

One more clue that I have found is that my processor is peeking up to 70-80% when the button1 activates by the backgroundworker.

First time button1 doing its code, the processor is about 50%.
Still I wonder and cant figure it out why these lines doing the process slower,
from 30 seconds to 60 seconds (double time).
The slower process is depending on just these lines, because if I take them away it is still 30 seconds as it should be.

if((1) < 0){dataGridView1->Rows[i]->Cells[2]->Style->ForeColor = Color::AliceBlue;}
if((1) == 0){dataGridView1->Rows[i]->Cells[2]->Style->ForeColor = Color::Aquamarine;}
if((1) > 0){dataGridView1->Rows[i]->Cells[2]->Style->ForeColor = 
Color::Beige;}
Liszt 23 Junior Poster

I wonder if you might need to change the listViewProperty "View" to List.

Liszt 23 Junior Poster

If you want to add items to a listview, you can do like this. Hope it helps.

(Read contents from file and get strings/text)

String^ TextFromFile;
listView1->Items->Add(TextFromFile);

Guys I need to read from a text file and display to a listview I have tried google but nothing like what I am looking for, can anyone help me, Im using windows application

Thanx in advance

Liszt 23 Junior Poster

I see, I have to check for this. I have found the SystemFileWatcher component and are reading about thishere. Using this it will be possible to check for LastWritten by selecting a directorypath wich will contain a number of files. (*.txt)

This will cath the filenamepath.

private: System::Void fileSystemWatcher1_Changed(System::Object^  sender, System::IO::FileSystemEventArgs^  e) 
{
		 
	 String^ Name1 = e->FullPath;		 
}