|
System.IO.File in .Net 2.0 is really fast and has some new methods like ReadAllText() and ReadAllLines(). Why not some custom methods for your app?
Later, JoeSox
"Football is a game of cliches, and I believe in every one of them." -Vincent Lombardi
CPMCv1.0 ↔ humanaiproject.org ↔ Last.fm
|
|
|
|
|
How do you mean you should do then?
|
|
|
|
|
I was thinking of using ReadAllText() within an asynchronous method. Just read chunks of the 80mb from a temp file using ReadAllText(), when the user nears the end point create, then read another chunk into the textbox.AppendText(tempfile.ReadAllText()).
Later, JoeSox
"Football is a game of cliches, and I believe in every one of them." -Vincent Lombardi
CPMCv1.0 ↔ humanaiproject.org ↔ Last.fm
|
|
|
|
|
ReadAllText() is synchronous method, when you try to read a large text file, your application will hang or slow down ... better to use asynchronous medthod !!!
|
|
|
|
|
hackerhcm wrote: ReadAllText() is synchronous method, when you try to read a large text file, your application will hang or slow down ... better to use asynchronous medthod !!!
Of course, I was thinking of using ReadAllText() within the asynchronous medthod. Just read chunks of the 80mb from a temp file or something using ReadAllText(), when the user nears the end point create then read another chunk.
Later, JoeSox
"Football is a game of cliches, and I believe in every one of them." -Vincent Lombardi
CPMCv1.0 ↔ humanaiproject.org ↔ Last.fm
|
|
|
|
|
How to get the real Length of UTF8 String?
Thanks
Nothing
-- modified at 11:58 Tuesday 7th March, 2006
|
|
|
|
|
String.Length?
___________________________________
Tozzi is right: Gaia is getting rid of us.
My Blog [ITA]
|
|
|
|
|
The length of an UTF8 string can be interpreted in two ways:
1. The number of bytes that the encoded data uses.
2. The number of character that the decoded data contains.
The Encoding class has the GetByteCount to calculate the first one, and GetCharCount to calculate the second one.
---
b { font-weight: normal; }
|
|
|
|
|
|
Hi. I'm trying to measure one line string with the space character at the end. For example "Testing string ".
The problem is that the size that I get is the same size measured without the space at the end. Anybody knows how to make MeasureString() take the space character at the end into consideration?
|
|
|
|
|
Make sure you pass StringFormat with MeasureTrainingSpaces:
StringFormat format = new StringFormat(StringFormatFlags.MeasureTrailingSpaces);
g.MeasureString(..., format);
|
|
|
|
|
Hi,
I need to desigen an OSK.
Does anybody know hoe do i keep the OSK out of focus even when i click it's buttons while keeping any other form (the target form) in focus so the cgharacters i'm sending from the OSK (Sendkyes) will reach thier destination?
tnx
--roy
|
|
|
|
|
I would imagine you'd send keyboard messages to the window in question.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Use WS_EX_NOACTIVATE on the window styles, so the OSK won't gain any focus.
|
|
|
|
|
I've got some problems parsing strings and /* */ comments. Any help will be appreciated.
-----------------
// multyline comments
case '*': case '/': case '(': case ')': case '+': case '-': case '=': case '~': case '|': case ';': case '%': case '&': case '{': case '}': case ',': case '[': case ']': case '?': case ':': case '^': case '<': case '>': case '!': case '.':
substr += s[i];
i++;
{
if(i < s.Length && (substr == "/"))
{
if(i < s.Length && (s[i]== '*'))
{
do { substr += s[i];
i++;
}
while (i < s.Length && substr== "*/");
rTB2.Text += "Komentar - " + substr + "\n";
substr = "";
}
-----------------
case '"':
{
do
{
substr += s[i];
i++;
}
while (i < s.Length && s[i]!='"');
rTB2.Text += "Tekst - " + substr + "\n";
substr = "";
} brake;
-----------------
If someone want, here is a direct link to my code.
http://www.geocities.com/puma55555/MyC.zip
|
|
|
|
|
Why not just post your problem here? Few are going to take the time to download, unzip, and study your code on their spare time. Just post the problems you're havnig here and we can help you.
Also, if you code is in the C or C++ languages (guessing by your zip name), you're in the wrong forum.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Lent Revisited
The apostle Paul, modernly speaking
Judah Himango
|
|
|
|
|
|
I created a user control in C# that I'd like to display in IE. I also did create a virtual directory on my local host. It works fine on one machine, but I can't get the control to show up on 3 other machines. They just show a placeholder box for the control.
Here is html that I am using:
<object id="MyUserCtrl"
="" classid="http://localhost/MyCtrl/MyCtrl.dll#MyCtrl.UserControl1" height="500" width="500" viewastext="">
I think this might have something to do with my IIS settings?
Please help.
|
|
|
|
|
Do these other machines have the .NET Framework installed? They'll need it to run your control.
Also, is .NET Framework and IE security setup properly to allow code to be executed from a network source?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
other machines do have .NET installed on them.
|
|
|
|
|
Well, the other machines will need the .NET framework on their machines. Also, if your control is doing anything that requires elevated security permissions, you'll need to grant that assembly higher privileges.
|
|
|
|
|
All other machines do have .NET installed on them
|
|
|
|
|
Try adding your website to the target machine's trusted sites list in Internet Explorer.
One thing you might want to try is just a simple "hello world" inside IE to see if the users can even run that. If they can't, we know it has nothing to do with your code and its security permission requirements.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Lent Revisited
The apostle Paul, modernly speaking
Judah Himango
|
|
|
|
|
the fact that I can run it on one of the machines tells me that the app itself is ok. I even did not have to add my site to the trusted sites there. What security permission requirement do I need to check on the machine where it does not run?
|
|
|
|
|
Hello everyone,
I've officially lost my mind. I'm trying to sign a third party dll which I wont beable to get a PIA from the company for. Based on microsofts documentation I should beable to use the Ildasm.exe tool similiar to this: ildasm assembly.il /dll /key:publicprivatekeyfile.snk but i get an error message back from ildasm stating that "INVALID COMMAND LINE OPTION: /dll". I am staring at the ms documentation telling me to use that option. What am I doing wrong here?
Thanks!
Ryan
|
|
|
|