|
Hi,
two comments:
1.
File.GetLastAccessTime does not really work on most systems. By default Windows does not track file access as that may create a heavy load on the file system; you can enable it through the registry somehow but I would not recommend that.
2.
IMO LastModificationTime is much more useful than CreationTime, since LastModificationTime is about the file content, whereas CreationTime is about the empty file. So when I now copy an old fle, it normally keeps its LastModificationTime but it gets its CreationTime set to now.
BTW: The above could be different for each and every file system (NTFS, FAT, FAT32, ...)
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hi.
How to run C# program in network pc without install dotnet??
i Install .netframework in network pc.
|
|
|
|
|
Don't use the .Net framework in your application and you don't need to install it. If you use it, you need to install it - simples
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
how can i run without using DotNet??
|
|
|
|
|
You can't.
Either you make the program in another language or you install .Net framework.
C# needs the framework and will not work without it.
|
|
|
|
|
|
I think Musefan is referring to Native Code? Like ah... Win32? Or I could be wrong
Regards,
Jason Pezzimenti.
If you liked the answer that I have provided, then please click the 'Good Answer' link on the bottom-right of this post. Thank you.
|
|
|
|
|
You say
mjawadkhatri wrote: i Install .netframework in network pc.
If you have installed the .NET Framework, what on earth is the dotnet that you refer to?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi everyone,
Any idea how would you show a nested table with the (+) sign in a DataGridView control to represent a one-to-many relationship in one table??
You know, something like
------------------------------------
Customer_ID Customer_Name
------------------------------------
(-) | 1 Customer1
| 1 Item1
| 2 Item2
| 3 Item3
-------------------------------------
(+) | 2 Customer2
-------------------------------------
(+) | 3 Customer3
--------------------------------------
Thank you!
|
|
|
|
|
As I'm sure that you are aware there are plenty of examples of this for ASP. I have never seen one for DataGridView on WindowsForms though.
Although you might want to look at the DataGrid from the pre .net 2.0 days, which has similar functionality. It is still there in System.Windows.Forms for compatibility and I believe you can add it to your Toolbox, if you really must. I have to say though, that it looks really clunky.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
True and true,
I've seen plenty of it in ASP, and I had a feeling and tried DataGrid ver 2.00 but it gives you a stupid link to replace the current table instead of branching to a sub table
|
|
|
|
|
I didn't know where to post this question, but this was as close as I could get.
I have an excel application which I want to transfer to winform C#.
Brief Description of Application
1) In my application I have several Sheets A,B,C etc (normally 40-50sheets) where I put my data.
2) After, I copy the data to A(1),B(1),C(1) (another 40-50sheets) and make my calculation via VBA, deleting, adding rows etc. until I get the required results.
Sometimes, I create another copy of A eg. A(2) and start calculation again and after comparing the results of A(1) and A(2), I delete the unused version.
3) After I am satisfied with the result I make the reports of A(1),B(1),C(1) via Pivot tables.
Questions
1) What is best way to simulate the Excel sheet in C# app eg. dataset, datatable, IList, since I have a lot of sheets (more than 100 per project)?
2) What database should I use (Access, XML, SQL) to store the data sheets of A,B,C and A(1),B(1),C(1) the application will be used Locally only?
3) My main question is, how should I solve this problem in theory, a pattern or perhaps a process description from experts would be really helpful .
I hope this makes sense....
|
|
|
|
|
Will this application only be used locally? Or are you wanting to connect to a remote database on the net somewhere?
|
|
|
|
|
This app will be running only locally...I am still using the excel sheets but they are not user friendly and also I can't share my app with others due to codesecurity
|
|
|
|
|
create a control inside a thread and update it
i need to create a thread and that thread creates a browser and update the image in browser each time it executes
m geting nulref exception
public void setWebBrowser()
{
Invoke(new EventHandler(workerAddBrowser));
}
void workerAddBrowser(object sender, EventArgs e)
{
if (flag == 1)
{
browser.Refresh();
}
browser = new WebBrowser();
Controls.Add(browser);
browser.DocumentText =/* new Bitmap(File.Open("\\Program Files\\pic\\screen.jpg", FileMode.Open, FileAccess.Read));*/"<img src='file://\\Program Files\\syswifi\\pic\\screen.jpg' width='240' height='320' />";
}
m getting the excepton in line invoke()
and the thread is started like this
objscreen = new screen(sock);
thrdreceive=new Thread(new ThreadStart(receiveSocket));
thrdreceive.Start();
the class is same
This code was posted by me...
|
|
|
|
|
Hi,
I can't tell why exactly you're getting a null reference exception since you didn't provide enough information; look at the line numbers, maybe it is because browser is still null.
I suggest you read two of my articles: the latest one on cross-thread problems, and the one on Visual Studio tricks.
See sig below.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hi
I need a code for playing "wav" file via modem.
I work without any component or dll file and just by AT Command and SerialPort.
in my program, i dial to a phone number by this code:
serialPort1.PortName = "COM3";
serialPort1.BaudRate = 9600;
serialPort1.DataBits = 8;
serialPort1.StopBits = System.IO.Ports.StopBits.One;
serialPort1.Parity = System.IO.Ports.Parity.None;
serialPort1.Handshake = System.IO.Ports.Handshake.None;
//serialPort1.DtrEnable = true;
try
{
if (serialPort1.IsOpen) serialPort1.Close();
serialPort1.Open();
serialPort1.Write("ATZ" + Convert.ToChar(13));
serialPort1.Write("AT+FCLASS=8"+ Convert.ToChar(13));
serialPort1.Write("ATDT"+txtTel.Text + Convert.ToChar(13));
serialPort1.Write("AT+VSM=129,8000"+ Convert.ToChar(13));
serialPort1.Write("AT+VSD=128,0"+ Convert.ToChar(13));
serialPort1.Write("AT+FLO=2" + Convert.ToChar(13));
serialPort1.Write("AT+VTX" + Convert.ToChar(13));
}
catch
{
MessageBox.Show("Can not open Port");
}
...
and then send "wav" file by this Function:
private void SendVoiceData()
{
byte[] buffer = new byte[20000];
FileStream strm = new FileStream("voice.wav", System.IO.FileMode.Open);
//MemoryStream ms = new MemoryStream();
//int count= ms.Read(bt, 0, 10000);
rdr = new BinaryReader(strm);
while (true)
{
byte[] bt=new byte[1024];
bt = rdr.ReadBytes(1024);
serialPort1.Write(bt,0,bt.Length);
}
}
Please Help me how can i play a "wav" file via modem.
tnx
|
|
|
|
|
nobody!
|
|
|
|
|
You need to read the documentation for the device that you're trying to play the recording on. If it's possible then that should tell you how to do it.
|
|
|
|
|
there are'nt any Source Code in device documantion.
i need Source!
|
|
|
|
|
Mahyar_Habibpour wrote: there are'nt any Source Code in device documantion
I wouldn't expect there to be. What should be there is a description of all of the features of the device and maybe a reference for the AT commands that the device accepts.
It I were in your shoes here's what I would do: First I'd look for a chapter in the docs entitled "Playing Sound Files Over the Serial Port" or something similar to that. If you can't find anything like that then I'd scour the command set for one that allows you to play a file streamed over the port. If you still can't find anything helpful then I'd go back to the device vendor and ask them how to play a sound file.
Mahyar_Habibpour wrote: i need Source!
There's no way that anyone here can give you that. Your question doesn't contain nearly enough information to even begin thinking about source code; it's missing information like what research you've done, what you've tried so far, what kind of device it is, what makes you think it can even play wav files, etc.
That statement raises a larger issue anyway. If the only way for you to accomplish something is for someone to give you the code then I dare say you aren't cut out to be a software engineer. If that's the way it is though then go back to where you got the code to connect to the device and look there for how to play a file.
|
|
|
|
|
|
HI all,
I am using a datagridview control on a form and one of the columns is defined as datagridviewtextboxcolumn type. This column is used to display and amount and the cell is editable allowing the user to modify the amount. I already formatted this column as "N0" so when the user moves the focus to amother element this cell displays the amount as a number (eg: 1,000,000 for 1 million). Anyway, I want to be able to format this value as number as the user types the amount... so instead of getting 10, and then 100 and then 1000... 100000 as he types, I would like to show 10.. 100 .... 1,000 .... 100,000 so the user won't have to count how many zeros he typed. I already implemented such a feature in a standalone textbox control using the TextChanged event, but I am unable to implement this in the gridview.
Is it possible to achieve this in a gridview cell? What event(s) should I implement to get this functionality working? I am opened to any suggestions or comments!
Thank you in advance!
Andrei
|
|
|
|
|
Hi
you told the solution already
you have to create a user control of datagridview column type with the number textbox you created and make column type of No as the newly created datagridview column.A sample code for customized datagridview column type is available with in the msdn
If you can't just mail me
regards
shine.paravur@gmail.com
|
|
|
|
|
If i want to crop a rectangle of the used part of a bitmap, what is the easiest way to do it?
|
|
|
|