|
Thank you for your respond...
But i want it to use the .NetFramework redistributable file instead of telling the user to install the .NetFramework from the internet.Could you tell me how to do this?
|
|
|
|
|
You must configure the bootstrapper from the build menu in your projects, so that it starts the setup from the same directory.
------------------------------ "The Soapbox has been so ..."
|
|
|
|
|
Thank you I will try it.
|
|
|
|
|
I have an arraylist full of strings, some of which will hopefully be identical (ie every entry will not be unique). How can I go about finding the most common string, the string that occurs most often? Does .NET give me any nice methods for doing such or will I have to do it myself?
I can think of one method; by making a 2D array, one dimension for storing the string, one dimension for storing the number of times it appears. However I dont think you can make a dynamically self sizing 2D array (like an arraylist) can you? If this is true I would need the array to be large to take care of the unknown number of items in the array list, and would end up being very slow.
Any help is much appreciated.
|
|
|
|
|
You could create a Hashtable where the keys are strings and the values are ints (the number of occurences of the string). Loop over the ArrayList of strings and either add each string to the table with a counter of 1, or increment the counter if the string is already in the table. When you're done, loop over the Values of the table and look for the highest counter.
Josh
|
|
|
|
|
Subterranean wrote: However I dont think you can make a dynamically self sizing 2D array (like an arraylist) can you?
You could make an arraylist populated with arraylists! That gives you something similar to a 2-D dynamic, jagged array.
However, if you're just storing the number of times a string appears you don't need a 2-D array at all. You just need to store an int with the frequency for each string.
You could create a class that wraps your string (as a member) and includes a member for the number of times it exists and store that in an ArrayList.
|
|
|
|
|
How to display data of datagrid into crystal report.
|
|
|
|
|
hi i think you need to generate a report for the dataset witch is supplying data to grid.
first you have to place the crystal report viewer on your form then you have to add crystal report page your project.then you have to connect the data base and particular table with that report page and allign the page.
now come to the form,
1.create the object for that crystal report page file,assume that name is crys1.rpt
then crys1 cry=new crys1();
2. set the logon password and uname for sql server
cry.SetDatabaseLogon(uname,password);3. set the report datasource
cry.DataSource=dataset;4.set the report source to crstalreport viewer
crystalReportviewer1.ReportSource=cry;
5.Bind the data source
crystalReportViewer.DataBind()
|
|
|
|
|
i'm creating a software that paint and draw on a picturebox, but it is very slow.
How can i accelerate it?
|
|
|
|
|
You may better draw on a panel not a picturebox.
------------------------------ "The Soapbox has been so ..."
|
|
|
|
|
|
Are you using the paint event to draw on top of the picturebox, or are you drawing on the image in the picturebox?
---
b { font-weight: normal; }
|
|
|
|
|
the second one calling invoke()
|
|
|
|
|
I don't know how are you doing the painting, but in my experience using double-buffer painting (by calling SetStyle(...)) has great effect on painting. Trying to do "ngen" will show you a very fast code execution resulting a good paint also.
AISAC - An Intelligent Sense of A Computer
http://aisac.wordpress.com
|
|
|
|
|
what is ngen? And where i have to do it?
|
|
|
|
|
NGen is the tool that ships with .net framework. IF you've installed Visual Studio or .net framework sdk, go to sdk or vs commnad prompt (to have the path to ngen.exe) and try to run ngen.exe, it's a command line tool.
AISAC - An Intelligent Sense of A Computer
http://aisac.wordpress.com
|
|
|
|
|
hi all
i am created one windows application with opendialog box and stream reader. it is running fine in my mechine. then i copied that in to my server. when i try to the project in server, i am getting the fallowing exception
Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
i had searched in the net with the above keyword and find that .net won't give permission to run projects in shared/network drives. is there any other solution for this
coolsweety
|
|
|
|
|
Hi all,
We have a functionality that opens a word document on a button click . The user can enter any thing in the word document and it gets saved with a different name.The original document is closed.
The problem is , every time the application is run, it opens a WINWORD.EXE in the processes tab of the task manager, which , after repeated executions of the project, add up to a large number.I cannot figure out why tjis is happening even as the word document is being closed after saving.
So is there any way to close the process as soon as the document is saved with a differenty name?
Thanks in anticipation
|
|
|
|
|
I have the same problem sometimes with Word 2003 when using outlook.
If you use automation you'ld probably be able to use some function from the object model or something.
If all else fails, look into the Process class.
eg.:
Process process = Process.GetCurrentProcess();
process.Kill();
hope this helps.
Coulda, woulda, shoulda doesn't matter if you don't.
<marquee>
|
|
|
|
|
hi,
Process proc =Process.GetCurrentProcess()
Proc.Kill()
is killing my application but not the winword..
Is there a way to identify the winword process uniquely and kill it?
Thanks...
|
|
|
|
|
You didn't read correctly .
Look up the Process class on MSDN.
This was just an example:
Process proc =Process.GetCurrentProcess();
Proc.Kill()
You can find the process by name or by id.
Coulda, woulda, shoulda doesn't matter if you don't.
<marquee>
|
|
|
|
|
If you are using Interop dlls, so you should have used Word.Application object and the Documents collection to Add/Open a new Document.
In this way, when you are done with the object, you can simple use Word.Application.Quit() method. It will close winword.exe automatically.
Be sure you're not just openning the document and let it just be. Take care of that by events implementation.
AISAC - An Intelligent Sense of A Computer
http://aisac.wordpress.com
-- modified at 14:29 Thursday 4th May, 2006
|
|
|
|
|
hi,
Thanks for the reply..
I tried Word.Application.Quit()..
It gave me the following error..
Reference to a non-shared member requires an object reference...
I guess i will have to use process.kill()...
Thanks..
|
|
|
|
|
For Word.Application.Quit I meant the path to the method, actually you should have an object like this:
Word.Application wApp = new Word.Application();
Word.Document wDoc = wApp.Documents.Open("foo.doc");
...
wDoc.Close();
wApp.Quit();
AISAC - An Intelligent Sense of A Computer
http://aisac.wordpress.com
|
|
|
|
|
Thanks for the reply,
I am using
wDoc.Close()
wApp.Quit()
It is closing the document but not the associated winword.exe.
After repeated runs of the application, i have a lot of winword.exe's running
in the task manager.
how to close the associated process after the document is saved and closed??
Thanks in anticipation
|
|
|
|