|
Hi,
The code you have shown seems right.
Make sure you don't confuse creation time and modification time, Windows Explorer can be
told to show one or the other (or both).
BTW:
- if you write to an existing file, even when replacing all the content, that will not
modify the creation date.
- if you copy a file, the new file may or may not get its creation time set to now, depending
on how you do it.
Finally, I tend to show and use a file's modification time most of the time, since that better
tracks the file's content.
|
|
|
|
|
It looks like you're absolutley right. It's giving me the creation time which is today, but I want the last modified property. How do you get that to show inside the code?
I really appreciate all your help!!
I think I may have figured it out. Do you use the lastWriteTime property?
|
|
|
|
|
FileInfo has some 15 properties, the one you need is in the documentation;
scan the list, you will spot it even if it has a somewhat peculiar name.
|
|
|
|
|
THANKS!!
It it LastWriteTime. You were very helpful and I appreciate the time you took to help me.
|
|
|
|
|
You're welcome.
|
|
|
|
|
Hi every ONE
i am working in a current project in the final process ( Crystal Reports )
there is a table that each user have more than one and more rows
i want to make a report like this view
- User_ID
row1: - Colm1 - Colm2
- Colm---------3
row2: - Colm1 - Colm2
- Colm---------3
i am using C# .net , please any one help me as soon as posible ..... URGENT
|
|
|
|
|
Ahmed EL Gendy wrote: help me as soon as posible ..... URGENT
That is considered very rude and likely won't get you any help on this site.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hey
on vb we use Handles to handle code with many controls ,
Now one C# I want to handle a code with some textboxes keydown event
then what can I do ..
I feel that vb is more easy in coding than c#
jooooo
|
|
|
|
|
Hi,
try simply adding the same event handler to several text boxes using properties window in designer.
For furher study, investigate the generated designer.cs code. With a little effort you get the idea what happens at code level.
Hope this get's you going.
Mika
|
|
|
|
|
thanks my friend and i will check it now
jooooo
|
|
|
|
|
You're welcome.
Mika
|
|
|
|
|
Hi,
if you have the same event handler for several Controls (either through Designer, or by code),
then the event handler can figure out which Control fired the event by looking at the first
parameter object sender .
Say e.g. all Controls firing this event are Buttons, then simply do
Button btn=(Button)sender; and you are holding the Button that fired the event.
You may want to be more defensive and use the as instead of a straight cast though.
|
|
|
|
|
thanks my friend
you are right to use
sender
now I'm checking it and thanks for really kinds friends here
jooooo
|
|
|
|
|
You're welcome.
Enjoy C#!
|
|
|
|
|
I have a problem with mdi forms in my application. There are two mdi forms. They have scroll bars. There is a control on the left mdi form near to the top.
Now the problem is: I scroll the left mdi form to the bottom. I click to the other mdi form. I click back to the left mdi form and when the left one is activated/focused it automatically scrolls to the top where the control is and sets focus to it.
There're absolutely nothing in the code anywhere to do this. There're no .Focus() calls, no OnFocus event, .ActiveControl= etc. Nothing. I couldn't find a way to prevent this and it's driving me insane. I even tried to handle *FOCUS Windows messages it's receiving but failed. Can you please help me find a way to prevent this? I appreciate any help.
|
|
|
|
|
I've solved the problem. Turns out mdi form focusing to the control with lowest TabIndex value behavior is by design. Setting TabStop property of every control to false prevents this from happening.
|
|
|
|
|
Hi I am using Frameset in my project,
my project is in .net
I am getting un necessary horizontal scrollbars in the project
it looks ugly
i dont want that horizantal scroll bars
how can i achive this..
Thanks,
Anand
|
|
|
|
|
You should ask this in the ASP.NET forum, not here.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
Hi All,
I am facing a vary basic problem with timer. I want a timer to start counting an integer i with a start-button-press and stop counting with a stop-button-press. Then start counting again with start-button-press and so on. The code looks like the following sample snippet:
int i=0;
Timer tmrTest = new Timer();
public void OnTimerEvent_test(object source, EventArgs e)
{
i++;
txtCounter.Text = i.ToString();
}
private void btnStartTimer_Click(object sender, EventArgs e)
{
tmrTest.Enabled = true;
tmrTest.Interval = 500;
tmrTest.Tick += new System.EventHandler(OnTimerEvent_test);
}
private void btnStopTimer_Click(object sender, EventArgs e)
{
tmrTest.Enabled = false;
}
The problem is on start-button-press first time it counts i as i+1 but in second start-button-press it counts i as i+2, for 3rd it's i+3 and so on. But I want the counting to be always i=i+1;
May be this is a very simple issue while handling timer but I failed to get any solution. Please help me to solve this out. And tell me the reason, why is this timer behaving like this?
Thanks in advance
Faysal
|
|
|
|
|
Faysal wrote: tmrTest.Tick += new System.EventHandler(OnTimerEvent_test);
Hi, this line should be executed only once ever. The way you have it, each time you click
the start button, it will add a handler to the event, so after N starts, each tick will
increment the counter N times.
You may want to read my article on events and delegates.
|
|
|
|
|
hi,
I want to make css Builder how to make it please help me.
thanks
Wafy
|
|
|
|
|
The first step is to specify what it should actually do.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
We are having a Crystal Report with Unicode data (Indian Language-Marathi) as
an output.The report is getting generated but at line break a word is getting
cut instead of getting wrapped in next line.
We are working with Crystal Report which is a part of VS 2005.
Please suggest the solution either in Crystal or any other Reporting
method/Tool.
Thanks
|
|
|
|
|
we developed windows application using C#,and we created setup file(Using Installer Class also ) for this ,this setup runnig succes fully in my machine ,but problem it was not runnig in Client Machine ,it is showing error " login Failed User is Not Trusted user " . How Can Connect client Sql Server 2005 .Could u Please help me.
|
|
|
|
|
Hi
As regard a Program, How can I Determine An Expire Date By Means Of a Code?
Thanks.... 
|
|
|
|