|
Hello,
I've been retrieving the hidden text from a link (RichTextBox link) using the following:
private int GetFirstHiddenCharacter(int position)
{
this.Select(position, 1);
while (this.SelectionType != RichTextBoxSelectionTypes.Empty)
{
position++;
this.Select(position, 1);
}
return position;
}
then using a substring function to get the rest of the hidden text.
Anyone know of a more elegant way to do this? i.e. without selecting each character.
Thanks.
Abisodun
|
|
|
|
|
Hello,
When I/O performance is slow (because of large file copy or OS deployment via network), my .NET application performs much slower than normal Windows apps like Explorer. It seems that my .NET application needs frequent disk access and does not use any caching. I found this out while running a low-memory virtual machine (like 256MB) and doing a large file copy and then trying to minimize and maximize my .NET application.
How can I improve the performance? Does someone know tips to improve the performance?
Thanks.
|
|
|
|
|
I would start by looking at the CLR assemblage of your application. You should look for boxing/unboxing calls as these are an easy thing to fix performance wise. Let me look around, I got a slide presentation from Tom Fuller on this very issue. A good tool for looking at the clr is Reflector.
Hope this helps.
_____________________________________________________________________
Our developers never release
code. Rather, it tends to escape, pillaging the countryside all around.
The Enlightenment Project (paraphrased comment)
Visit Me at GISDevCafe
|
|
|
|
|
If your app needs lots of disk accesses it is likely to be IO bound, not CPU bound.
And yet you see it reacting slowly (or not at all?) to minimize/maximize commands.
Maybe I am misunderstanding what you describe, it sounds to me you are doing disk
operations from within the UI thread and complaining about UI responsiveness.
If so, start using a couple more threads...
Luc Pattyn
|
|
|
|
|
No, My application is not doing any disc activity. But windows is doing that.
I think maybe my problem comes from the background image that i have in my application.
Is there a way to cache it, speed the refresh up or just don't refresh it?
|
|
|
|
|
please be much more specific as to what is going on on your system, and what you
observe. Just a few questions, but incomplete since I dont know your stuff:
large file copy: how large ? how long does it take normally ?
is the large file copy invoked by your app, or is it an independent system activity ?
if by your app, is it invoked by the UI thread ?
between which devices is the copy ?
if not doing large file copy how fast/slow is a form maximize/restore/minimize ?
and with large file copy, how fast then.
What is the complexity of the form, what is special to it, how large is your background
image, is it the form's background, your desktop or what ? where is it stored ?
(should not be a problem if reasonable size = less than 10MB, on a normal local hard disk
that is not otherwise overloaded, and without memory shortage).
What is your memory situation: how much RAM, what is your app's working set, does
it need large objects (over 30 MB each) ?
Are there other anomalies: slow resizing, slow painting, jerky behavior, whatever...
How is CPU load (watch task manager/performance) when things go normal, and when
things go slow.
Luc Pattyn
|
|
|
|
|
Hi people
i have 1 question ! How to edit pascal document from c# !? I have compiler only to edit and compile!!??
Thx
nemanja
|
|
|
|
|
You just want a text editor ? Do you want syntax highlighting and so on ? If so, you need to write a control to do it.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
conemajstor wrote: i have 1 question ! How to edit pascal document from c# !?
Why would you? Just use the pascal IDE (like Delphi) or NotePad. Or download another editor, like NotePad++
|
|
|
|
|
Hello,
I have got a datagrid that I have databound an XML file as the data source, this view correctly and I am able to insert and edit/update/delete the entries as I wish.
I am looking to be able to custom sort the list, with the help of "move up/down arrows" on each row within their own columns in the grid; I am quite new to this and have had no luck with finding any examples.
Could any one point me in the right direction?
Thanks
Bart
|
|
|
|
|
Reading a reply from another read got me wondering what people are using for their unit testing and why. I had always used JUnit and NUnit as I had for a short while worked with java. Coming into .net again I discovered csUnit which will be added to your VS environment. I had not seen this functionality from NUnit.
Just Curious.
_____________________________________________________________________
Our developers never release
code. Rather, it tends to escape, pillaging the countryside all around.
The Enlightenment Project (paraphrased comment)
Visit Me at GISDevCafe
|
|
|
|
|
|
Thanks.
I really have not found too many differences in the two testing packages, integration into the IDE was the only big requirement I wanted.
I will have to play with both and see if there are any major differences/advantages/disadvantages.
_____________________________________________________________________
Our developers never release
code. Rather, it tends to escape, pillaging the countryside all around.
The Enlightenment Project (paraphrased comment)
Visit Me at GISDevCafe
|
|
|
|
|
I would like to automate testing of a Website writing code in C#,
The idea is to open the browser,navigate to the site,once the page is loaded search for a text box write some stuff in it click a button wait for the page refresh and search a string or an element on the page if so Succeeded else report failure,
Guide me with some method or article describing the procedure how to do it,
|
|
|
|
|
|
Hi all. Please see the following scenario. I have a textbox on my page with ADD button. when i enter some text in textbox and Click ADD, the text will be added in my gridview. so far, so good. Now, If i refresh the page, that record has been inserted again and Gridview will now show two similar records. Please tell me how to deal with it ? whether i have to keep check on textbox or what else ?
|
|
|
|
|
What are you doing in your page load or page init events?
|
|
|
|
|
in page load, i have write:
if (isPostBack == true)
{
if (txtValue.Text == "")
{
// Do Nothing
}
}
The paging size of my grid is set to 3. When i INSERT Record for first time, it shows only one record and on the page refresh, it doesnt insert record again. However, when i insert record for the second time, it insert record on page refresh again. Please tell me how to solve it.
|
|
|
|
|
First, there is no reason to qualify a boolean value. if (Page.IsPostBack) will work fine. But that's not your problem.
What's in the click event code?
|
|
|
|
|
Good People,
I am new to C#.
I have to build a desktop/stand-alone windows application. I have to assume the end user only has windows and .NET 2.0 on their computer. The application will need to have a database to store various information (i.e. statistics, unit performance, etc...). What database approach should I use that doesn't require them to have MS Office or MS Access? In other words, I need the database to ship with the software or be contained in it so that the user only has to install my software in order to fully use the application. I don't want them to have to install anything else besides - possibly, the .NET framework.
Also, is there a C# equivalent for the SQLite database or a C# API for it?
Thanks,
BP
|
|
|
|
|
SQLExpress can be used though it will need to be installed along with your applicaiton if not already on the users system.
only two letters away from being an asset
|
|
|
|
|
There are a few options. The two that I can think of off the top of my head are:
VistaDB: A commercial database system that can be distributed as a single DLL in your application's setup program.
SQLite: A public domain database system that is a couple of DLLs to add to your set up.
VistaDB is easier to use, although it costs money. SQLite is a bit more difficult to get going with and has no tools (although you can probably find something to help you design a database without doing everything programmatically), but it costs nothing.
|
|
|
|
|
SQL Server express is a good option, for something free. However, I don't think your client needs Access installed in order for you to ship an MDB file, which is easiest of all, deployment wise.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Thanks for your response,
Will that same strategy work with the full version of SQL Server?
Thanks again,
BP
|
|
|
|
|
Install latest version of MDAC and you can use a .mdb access file with no problem. .NET uses OleDb and the JET engine to access a MSAcces database and these are installed in any modern windows version...but just to make sure the client is running the latest versions, install the lates MDAC, downloadable for free from MS.
To make it short...MSAcces is the easiest deployment in your case and the client does not need to have it installed for the app to run perfectly using the db.
|
|
|
|