|
In the event axWebBrowser1_NewWindow2 just need to put below code
e.ppDisp = null;
e.cancel = true;
return;
|
|
|
|
|
I am desparately trying to get my apps forms to load acceptably fast before release to users. I thought C# was suppose to be comparable to C++ in speed? It seems more like VB6 is a better comparison! I wish i knew the real deal before starting this project! I was lulled into a false sense of security when i kept reading about miracles on the internet about dramatic increases in performance with little tweaks. I thought a solution would come along sooner or later.
I am developing in NET 1.1. My computer is 1GHz Sony Laptop Windows 2K.
Description of my forms:
Combination of custom controls, forms, and user controls. By using panels and user controls as subforms, forms are up to 3 levels deep. Form have about 10-30 controls each on them. Controls used are stock labels, buttons, checkboxes, radio buttons, textboxes. Some forms have customized listviews and combos inherited from stock controls. All forms have button icons.
What i have done:
I have used the double buffering control style with AllPaintingInWmPaint and UserPaint in the forms, user controls and custom controls where i could. Code is in the constructor. I am using SuspendLayout, ResumeLayout to wrap control setup code that is outside the InitializeComponent method. It is called either in the constructor or Form Load. I tried precompiling assemblies. No performance gain there.
Double buffering slowed form load down but improved the sluggish drawing. Sluggish drawing persists. To describe, drawing of forms seems to be done in pieces, not all at once. Overall, the perception of loading has improved a notch, BUT NO MORE THAN A NOTCH! I will note that once the form loads the first time, future access during program excution is fast. It seems form graphics are cached by the CLR. But that first time loading! Ouch!
What can i do?
|
|
|
|
|
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
|
|
|
|