|
Startup time is always expensive in a managed environment. At many points .Net performance is comparable to C++ performance but startup time definitely isn't.
First of all you could use NProf[^] to profile you startup phase.
Second have a look at nGen. It generates native images of your assemblies and stores them. Thus on startup the CLR doesn't have to compile everything.
Third... well depends on your form. Having too many controls (also nested) might naturally slow down performance. I can't give you any good advice on this because therefore I would need to know some details.
|
|
|
|
|
What's the file-size of the graphics?
Have you tried NGEN.EXE[^]?
I are Troll
|
|
|
|
|
hi guys !
need some help
i have to find out the file paths between string which has to be taken from User from a richtextbox
the problem is there is no specified location on which the user will type the path .. it can be any where in the string
for eg.
user entered data something like this :
If the above link is not visible then run the application "C:\Program Files\CasinoOnNet\Unwise.exe" and follow the instructions to uninstall the Casino on Net.
i have to find “C:\Program Files\CasinoOnNet\Unwise.exe” in this string.
these paths can be more than one and it is not necessary that they are in Quotes..
is there any way to find such paths ..
any idea
abhinav
|
|
|
|
|
A simplistic approach that (may) provide reasonably good results is:
search for the first occurence of a backslash character (\);
if (found) {
rewind to first previous space;
extract substring to next space (or end of string);
in source string, replace substring with empty string;
return substring;
}
return "";
PS: This is highly NOT a perfect solution. In particular, it won't properly handle paths containing embedded spaces.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
Use Regular Expressions:
using System.Text.RegularExpressions;
...
//Find all paths in the string
MatchCollection matches = Regex.Matches(richTextBox1.Text, "\\b[a-z]\\ \\\[^\\n\\r\\f\\t\\\\/<>|\":*?]+)*\\b", RegexOptions.IgnoreCase);
foreach (Match m in matches)
{
//do whatever you need to for each path found in the string. The entire path can be found using m.Value
//you can also find the index and length of the path in the string by accessing other fields of m.
}
Hope this helps,
DigitalKing
|
|
|
|
|
This might look a bit cryptic, but you can also try this regex (if you don't know how it works please refer to posting #2)
[A-Z] \[^/<>?*"|:” ]+)(\s+[^/<>?*"|:” ]+\\|[^/<>?*"|:” ]+)*
-- modified 12-Sep-18 21:01pm.
|
|
|
|
|
In my windows application (C#) I need to use a datarow array as datasource for datagrid ,but I don't know how to bind it .Any help please..
Thank you.
|
|
|
|
|
dataGrid1.DataSource = new ArrayList( dataRowArray);
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
I have used a dataset and fired a query on it using select method which returns datarow array.This array I want to bind to datagrid.
I tried your solution ,But what I saw in the datagrid was
RowError,RowState,ItemArray,HasErrors,Table as columns which are not the columns in dataset.
Any help on this?
|
|
|
|
|
Prashant Gadhave wrote: I have used a dataset and fired a query on it using select method which returns datarow array
For filtering rows of a DataTable you should use System.Data.DataView and set that as the DataGrid.DataSource.
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
Hi
I understand u r problem and has a solution
Use DATAVIEW
DataView Dv = new DataView(DataTable);
Dv.RowFilter = ""//Write the query
and then assign
datagrid.datasource=DV
vivek vitthalrao hedau
|
|
|
|
|
Hi folks,
I have a process that opens windows explorer, but it defaults to My Documents. Is there anyway I can default it to a folder of my choice, or navigate it like with the webbrowser control?
Thanks,
Ben.
|
|
|
|
|
Solved it, just needed to set the arguments option
|
|
|
|
|
|
You could draw on the Paint event, or paint to the Bitmap.
|
|
|
|
|
|
Hi folks, I have an urgent problem I need to solve, how can I set a folders attributes to make it a hidden folder?
Many thanks,
Ben.
|
|
|
|
|
Did System.IO.File.SetAttributes() not work? Never tried it myself.
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
Works for me!
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
Worked perfectly, thanks
|
|
|
|
|
how to view dataset object in debug mode in tabular view , any shortcuts?
san
|
|
|
|
|
I am using Infragistics ultragrid control. Grouped by particular column and try to sort it based on group by column. After sorting rows are not coming in proper group, Please help
santosh
|
|
|
|
|
kumar.bs wrote: I am using Infragistics ultragrid control. Grouped by particular column and try to sort it based on group by column. After sorting rows are not coming in proper group, Please help
Ask in their forum or try their technical support!
Regards,
Nish
|
|
|
|
|
I'm sorry I have to write it one more time (this is something like the 5th time), but no-one has answered and I have to get them figured out! and I will keep posting it every time it crosses the next page untill I will have answers, and as you see.... this is REALY ORGENT!
please help me...
1. I'm trying to build my own ICryptoTransform-able (System.Security.Cryptography.ICryptoTransfom) class, so I could use it in CryptoStream. (I searched in codeproject articles and didn't fine something helpful, I promiss that if some-one will help me I will write an article on how to do it!)
I already built the algoritm, and I inherited from ICryptoTransform as they wanted to, and I'm using MSDN to know what methods and properties I need to do, but there are two properties, and two methods that I don't know what to do with them, and what I should return from them... the properties are InputBlockSize AND OuputBlockSize, and the methods are TransformBlock and TransformFinalBlock, I don't know what they need to get (what does every parameter stand for), and what to return, the MSDN doesn't help me very much in here.
If anyone can tell me what to do in them, and even give me an exemple I would appriciate it...
2. And one more thing, where can I save information on my application (i.e is registered, setupdate etc...), and how that it won't be able to be changed without my pass or something like that...?
Thanks alot in advance
|
|
|
|
|
The MSDN page on TransformBlock[^] should help you with the parameter meanings.
As far as InputBlockSize and OutputBlockSize, have you tried some arbitrary value, say 4096? My guess is that this is just the size of the each block encrypted in/decrypted from the stream.
As far as storing information regarding setup, if you absolutely need it password protected, you'll need to write something yourself that saves the information to disk in an encrypted format and requires a secret password in order to modify. Chances are though, that's overkill. Just put that information in a configuration file or in the registry.
Also, threatening to keep posting your message does little for your cause; it makes you come across as demanding.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Islamic Domination: Coming to a Jewish state near you!
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|