|
Hi,
Thanks for the advice. We hope that there are no problems with the code and it is just a configuration issue. Just a doubt, where can I change the max working set?
Thanks,
rmga
|
|
|
|
|
I forgot to tell you, When the application is running in Windows 2003 and it reach 200Mb, the app stop performing the reflection dynamic execution.
This is beacause the app try to request for more memory but the OS doesn't give the requested memory. From that momment the app could't verify the state of the incoming transaction and reponse OK to everything. (This was developed to do that, When the app tries to create an object and couldnt achieve to get enough memory, it approve the transaction)
In Windows XP works fine and always achieve to free memory and re-use it to complete each evaluation.
rmga
|
|
|
|
|
So there must be a real problem then.
Did you call Dispose() on everything you create (either with keyword new,
or by calling a method that has Create in its name) that offers a Dispose()
method ?
I would recommend you add logging (preferably to a file), so you can
track the major events in your app; then compare the log sequence when things
go wrong with the sequence when things are still fine.
|
|
|
|
|
Hi,
I dont know, I trust you can somehow but I never needed it.
|
|
|
|
|
I have added a microsoft word 2003 reference to a program of mine.
I use C# .net visual studio 2005.
It all works fine.
I create a release and a dll file called Interop.Word.dll is created.
The release work fine on my computer but when i try it on another it doesn't work.
Do you know why?
Word exists on the other computer.
Is it because word doesn't exists at the same location on the other computer?
|
|
|
|
|
Did you copy Interop.Word.dll to the other computer, this is what lets it talk to Word? Is it the same version of word on the other computer? When you say it doesn't work, do you get an error? If so what is the error? If not what are the symptoms?
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
Did you hard coded the dll location?? Well, DONT .. You can always use the pretty handsome System.Environment.SpecialFolder to locate special folders on different computers.
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hi!:
I have created a usercontrol with one textbox and a button, and I need this control to be loaded in the datagridview. In a cell the value is the text property of the textbox. I have seen some examples but with the keyboard and the focus have problems. (There are answers in some links by Mark Rideout and Zhi-Xin Ye, but not a complete example running with the keyboard).
Any complete code example?
Thanks
|
|
|
|
|
webbrowser in csharp ?.
my progressbar just can't know when to restart ?
|
|
|
|
|
Omm... no one know this... .
when a website download his document his fired "DocumentCompleted" Messege some time before his actually downloaded the hole the web page.
So see if can repharse this again.
How do I can know which is the last "|DocumentCompleted" messege or
What the nexr Messege/Event that came after "DocumentCompleted last messege ?
Thank alot.
Guy.
|
|
|
|
|
How do I listen for program events?
At the moment when listening for key presses, it only works on user controls that have the keypress event set up.
How can I get the program to listen to the keypress event that occus in all of a single forms child controls.
E.g. so if the form has 5 different user controls, is there a way to set up the even in the form so that if the key is pressed while any of the child controls have focus, the event in the main form is still called?
- Munty
|
|
|
|
|
Assign all of the child controls keypress events to the forms keypress event handler. Note that this would not actually raise the forms event. If you needed that you may be able to call the forms keypress event (using the RaiseEvent statement) from the event handlers of each of the controls.
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
The problem with that, is that the KeyPress events don't seem to work on the User controls that edit their Graphics. (Button Click events do, but I need keypress events.)
That's why I was hoping there's some way of making shortcut keys from the parent form.
- Munty
|
|
|
|
|
Enable the KeyPreview property on the form, then handle the forms KeyDown/KeyPress/KeyUp events. The form will get first look at the key events before they're sent to the child controls.
|
|
|
|
|
Hi Dave,
Thanks for the reply. That was exactly what I needed.
Silly thing is, is that I had already tried that, and it didn't work the first time. Then after you suggested it, I decided to try it again. But I've got it working now
- Munty
|
|
|
|
|
i have a file has extention DAT
i write string line in this file
but when i read this line from the file it doesn't return string
this is the code i wrote
StreamWriter OpenToWrite = new StreamWriter("Connection.DAT");
OpenToWrite.Write(@"server="+txt_servername.Text +";database=NewWay;User ID="+txt_username.Text +";password="+txt_password.Text);
OpenToWrite.Flush();
OpenToWrite.Close();
StreamReader OpenToRead = new StreamReader("Connection.DAT");
string Conn = OpenToRead.Read().ToString();
thnx for help
MD_NADA
|
|
|
|
|
md_nada wrote: string Conn = OpenToRead.Read().ToString();
You would need to use the overload method Read(char[],startindex,length), this would store the value as a char array and you can read the value from that. You can use string conn = OpenToRead.ReadLine() instead.
This method of storing the user name and password in a text file doesn't seem to be a good way. You could use app.config to store the server name and the database name. You should probably be passing the username and password from the login screen or something like that. Atleast encrypt the password your storing in the dat file.
|
|
|
|
|
I'm not willing to debug your code, but here is a good example.
Read Text From/Write Text To a File (VB.NET)[^]
Note the code at the bottom of the page defining the functions GetFileContents and SaveTextToFile. Those functions correctly show how to handle the streamreader and streamwriter classes.
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
Hi,
I am trying convert Text to HTML. i am able to do this using the webbroswer control. My problem is something like this.. After assigning some text to the Webbrowser control i am not able to copy the contents from it immediately. But when i add a message box before copying or do the copy in a different event it works fine... i guess its something to do with the refresh, plz help me solve this. Below is the code i am trying.
<br />
IHTMLDocument2 doc;<br />
public WebBrowser browser;<br />
constructor..<br />
{<br />
browser = new WebBrowser();<br />
}<br />
<br />
click event..<br />
{<br />
browser.DocumentText = "This is a test message<br />
<br />
//With this line contents are available. I want to do this without this line.<br />
MessageBox.Show("Test");<br />
<br />
doc = (mshtml.IHTMLDocument2)browser.Document.DomDocument;<br />
Clipboard.Clear();<br />
doc.execCommand("selectall", false, null);<br />
doc.execCommand("Copy", false, null);<br />
RichTextBox r = new RichTextBox();<br />
r.Paste();<br />
Clipboard.Clear();<br />
MessageBox.Show(r.Text.ToString());<br />
}
|
|
|
|
|
I suspect the browser isn't fully initialized yet. Try calling DoEvents in place of the messagebox. I seem to remember a BrowserState or ReadyState property you can check as well. Check the state and wait until it is ready.
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
Thank you so so soooooo much... That absolutely saved my day.
|
|
|
|
|
Is there a way in C# or C++ to determine if given file is Binary or Non-Binary. There are some forums which suggests to check the bytes of file and look for null byte. Is there any other way around?
Any help would be appriciated.
|
|
|
|
|
|
Hi,
all files are binary, some contain text (in ASCII, Unicode, whatever), some
contain an image, or some other kind of data.
So you might have to clarify your question.
|
|
|
|
|
Of course, all files are Binary, but i want to differentiate files based on the printable characters they contain. Basically, i need it for a utility which would compare two files and write the differences between them to third file, or may update one file by comparing it to the others. I can only tell this much. Since, such comparision for "binary" files like DLL, Jar etc are meaningless i wanted to identify them before i compare them. I can't change the utility i will use for such comparision. I wrote following method, which i think would work fine. Do you think it would work across all character sets? I am just reading file byte by byte and looking for a byte which is zero. Then i know that the file is binary.
static bool isBinary(ref BinaryReader binaryReader) {
bool nullByteFound = false;
int i = 0;
byte unsignedByte;
while (i < binaryReader.BaseStream.Length) {
unsignedByte = binaryReader.ReadByte();
if (unsignedByte == 0){
nullByteFound = true;
break;
}
i++;
}
Console.WriteLine("Bull= " + nullByteFound);
return nullByteFound;
}
The other API IsTextUnicode may also help in solving problem if i retrieve IS_TEXT_UNICODE_NULL_BYTES flag. Thanks all for your help on this.
|
|
|
|