|
Doan Quynh wrote: while .exe file started and I can still delete, move or rename it
Oddly enough, for a Managed Code application (any .NET EXE), this is true. For native code applications, it's not.
Doan Quynh wrote: I wander when .exe32 load, the length of file will load to somewhere on memory?
Nope. It's not saved anywhere. The .EXE is literally unpacked and expanded, vaguely reminicent of a .ZIP file. There is nothing that specifies the original file size.
|
|
|
|
|
Hello everyone,
I am currently using a CSV file to store some data locally on the user's computer. Since these data is only required during the life time of the Windows Application, I was wondering if it is possible to store then in the Menory of the computer in order to speed up the process of dealing with the data contained in the CSV file?
Here is the example of the code I am using:
StreamReader streamReaderOne = new StreamReader("MyListView.txt");<br />
StreamWriter streamWriterTwo = File.AppendText("MyTemp.txt");<br />
while ((line = streamReaderOne.ReadLine()) != null)<br />
{<br />
split = line.Split(delimiterChars);<br />
line = split[0] + "," + split[1] + "," + split[2] + "," + split[3] + ",SAVE";<br />
streamWriterTwo.WriteLine(String.Format("{0}", line));<br />
}<br />
streamWriterTwo.Close();<br />
streamReaderOne.Close();<br />
<br />
File.Copy("MyTemp.txt", "MyListView.txt", true);<br />
File.Delete("MyTemp.txt");
khoramdin
|
|
|
|
|
You can pass it as a parameter to the constructor when you move between forms and the data is accessible to all the forms/class OR you could have a static property and store the data in it and retrieve it from any part of your namespace.
|
|
|
|
|
Hello Tarakeshwar Reddy,
Thanx for your reply. I am slitly confiused here. Do you mean I can pass my entire DATA which can be quiet Large as you mentioned?
Can I ask you to be more detiled with your suggestion or point me to be tutorial which you think and go into details regarding this issue?
Thank you very much and have a great day, mate.
kHORAMDIN
|
|
|
|
|
If it is large data you could probably save it in a static object. You could have a class called CSVData and that could contain some kind of static storage object which would hold that data as an XML or Dataset, etc. A static method could contain the method to access this data using some kind of parameters passed to it.
I do not have an example, but lets say you have a settings file for you project, you can load them at the startup of your program and the values from that are stored as static properties in a class file(FormColor, Font, BackColor, ForeColor, .....). So make the class read the data once and store it in static properties, which you can access from any part of the program.
|
|
|
|
|
I am using “System.Drawing.Printing” to print a drawing. Drawing consists a lot of rectangles, and lines. Actually my drawing is very large in size. Can any one tell me how can I devide drawing into pages. I will be thankful to you.
Regards,
|
|
|
|
|
get size of your drawing. create a bitmap using, then get graphics from the bitmap. Now use that graphics object to draw your objects. After finishing drawing objects, copy image to PrintPage event's
argument's graphics object.
Bitmap bmp=new Bitmap(width,height);<br />
Graphics g=Graphics.FromImage(bmp);<br />
<br />
Graphics gr=e.Graphics;
RectangleF rf=new RectangleF(0,0,printPageWidth, printPageHeight);<br />
gr.DrawImage(bmp,rf);<br />
e.HasMorePages=true;
Sorry i'm not very legible. But hope you will get an idea.
Aman Tur
modified 9-Jul-22 21:01pm.
|
|
|
|
|
Is it possible to call a java method, with parameters, from a c# program?How?I have to pass text to a java program from c#, receiving an answer.
|
|
|
|
|
|
Hi,
Askalo wrote: Is it possible to call a java method, with parameters, from a c# program?How?I have to pass text to a java program from c#, receiving an answer.
method or program ?
if you have the source of the Java method you can build a dll using J#.NET and
call its classes/methods as if they were C#.
if you have a program, its language does not matter. You can start it with the Process class
and alter its standard input, output, error streams.
|
|
|
|
|
Hi everybody !!!
i want draw a hexagon on form of c#.net. who can help me !!please guide me step by step and the most detail!!i need urgent !!hurry up please !!!! thank so much !!!!!!!!
contact Me : father_and_son_822003@yahoo.com.
|
|
|
|
|
switch(field)
{
case "A":
break;
case "B":
break;
default:
break;
}
|
|
|
|
|
|
well, we make a custom control . its a custom date time control . it has three textbox and a DateTimePicker .
On the validating event of the control,the code checks if the date is valid or not. if the date is not valid the event sequence is cancelled so that the control doesnot loose the focus . well the control works fine .
BUT THE PROBLEM IS , when the control is used in TabedPane,it does fire validating event but doesnot retain focus.
|
|
|
|
|
well, we make a custom control . its a custom date time control . it has three textbox and a DateTimePicker .
The user can either enter date through the textbox or select a date from the DateTimePicker. On the validating event of the control,the code checks if the date entered through the textbox is valid or not. if the date is not valid the event sequence is cancelled so that the control doesnot loose the focus . well the control works fine .
BUT THE PROBLEM IS , when the control is used in TabedPane,it does fire validating event but doesnot retain focus.
|
|
|
|
|
First, find what what's stealing the focus. See if there's some way to programmatically prevent that from receiving focus. Or, manually add focus through code when you need it.
|
|
|
|
|
This is a stupid question. But I wonder how I can use MS Office PivotTable in C#.
It seem to be a solution or an answer.
|
|
|
|
|
Interops..
I used PivodTable from Excel..
but to use them you must have Office installed
life is study!!!
|
|
|
|
|
How can we add the concept of TAB Navigation in ASP.NET 2.0 using c#
Geetanjali BHATIA
|
|
|
|
|
You can't, because your C# code doesn't run on the server. Client side behaviour, if it's not supported in the ASPX tags, is done in javascript.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Can I make a report using crystal report from database Access. without the use of v.s
merwa
|
|
|
|
|
A simple google search for "crystal reports access" brings up a number of possible answers[^].
|
|
|
|
|
i use .Net 2005 Windows application
i have datagridview Control and one of its column caontain Combobox
how can i bind datasource to this combobox
thanx
|
|
|
|
|
Dear it is very simple when you used the Wizard. if you add the combobox Then Used follwing Code
DataGridViewComboBoxColumn dgCombo = new DataGridViewComboBoxColumn();
dgCombo.DataSource = "";
dgCombo.DisplayMember="";
dgCombo.ValueMember = "";
dataGridView1.Columns.Add(dgCombo);
|
|
|
|
|
I have only one c# file (there is no solution file it's just a class file),here please tell me how to add a reference for a dll during runtime
Thank In Advance
|
|
|
|