|
Thanks for ur reply
but i want to know when we use the default scroll bar of
the richtextbox then how to know whether the scroll is up or down
hope u get ny problem
Thanks and Regards,
Pramod
|
|
|
|
|
Override the WndProc of your RichTextBox and catch the scrollin messages there.
Regards,
mav
|
|
|
|
|
Hi mav,
i have done the same thing but i'm not
able to catch the scrolling event of richtextbox there
it capture's the scroll event of the vertical scroll bar
that i have placed on the form
can u give any idea to catch the scroll event of
the Richtextbox in the wndProc Method
Thanks
Pramod
|
|
|
|
|
hi to all,
i am writing an app that lets users browse a folder. so they can perform several file/folder tasks on that folder and its subfolder/file.
i would like to be able to display teh folder stats when they open the top level folder.
at the moment, i am using directoryinfo and fileinfo and recursivley iterating the entire structure from the top level folder down, jsut to get the filesize.
is there a way to grab this from windows any quicker than this, cause if they select a drive ... well u know whats going to happen. i am also only building the tree structure that reflects the filesystem to a certain depth until they click to that depth i dont go any further.
if there is no other way to get folder size i might try creating the entire tree structure in the same recursive loop and see if the overhead is too much
any ideas pls??
regards,
g00fy
|
|
|
|
|
The total size of the contents of a folder is not stored anywhere. If you can get that information from the system, it will be doing exactly what you are doing yourself, recursively looping through every subfolder to sum up the file sizes.
---
b { font-weight: normal; }
|
|
|
|
|
thans for the reply,
i thought that after i posted, as i tried it on a folder and watched the count go up.
i just optimised my recursion and its working quite well now, it seems to beat the windows effort for the same folder on the same machine and i'm generating the tree for the structure as well. maybe windows is doing some indexing on the first size check as the next time you do it, it is faster.
thanx again,
g00fy
|
|
|
|
|
The reason it's faster on the second go, is that the most of the clusters containing the directory information is still in the disk cache. On the first go all the clusters has to be retrieved from the disk.
---
b { font-weight: normal; }
|
|
|
|
|
hi
I'm a complete learner about c# programming,I need some source code with the algorithm of case-based resoning.
pls help me
thanks in advance
|
|
|
|
|
Hi,
You need what is called a "switch" statement for "case based reasoning".
I would give you some code but what you are asking is so fundamental to almost any programming language
that I would suggest that you consult the MSDN help or any C# text (only so you really understand what you are doing). In addition,"case based reasoning (as you call it) is found in C, C++ C# etc..
so if you are looking for an easy way out you are cheating yourself
hope this helps.....
|
|
|
|
|
|
Hello again everyone. I am working on this project, and when the user clicks submit, while the page is loading to another page, I want that button to be disabled. I tried just going
<br />
<br />
Submit_Button.Enabled=false;<br />
but that didnt work while the page was loading, it only worked after a post back. Is there a way to immediately make it disabled after the user clicks it before it posts back while the page is loading?
|
|
|
|
|
Use javascript to disable it. As you disable the button you might need to post the form using javascript also, as you can't post a form using a disabled button.
---
b { font-weight: normal; }
|
|
|
|
|
I received lots of help last night trying to get text validated. Problem now is I can't "click out" of the 1st TextBox to the next one or close down the App. What to do?
private void textComplex_1Real_Validating(object sender, System.ComponentModel.CancelEventArgs e)
{
TextBox textBox1 = sender as TextBox;
if(textBox1 == null)
return;
if(textBox1.TextLength == 0)
return;
bool error = false;
try
{
cmplxValue1.Real = Convert.ToDouble(textComplex_1Real.Text);
//cmplxValue1.Imaginary = Convert.ToDouble(textComplex_1Imaginary.Text);
//this would be the next TextBox to validate
}
catch(Exception ex)
{
error = true;
}
finally
{
if(error)
MessageBox.Show("Error");
textBox1.SelectAll();
textBox1.Focus();
e.Cancel = true;
}
}
|
|
|
|
|
Hi,
I did not get what actually you are trying
to do.
Please could you specify what u want to achieve...
Regards,
Pramod
|
|
|
|
|
|
Instead of locking the user inside the textbox until it validates, do something else to show that the data in the textbox is wrong, like changing it's background color, and disable the ability to go further to use the text in the textbox (e.g. the next/send/submit/ok button).
---
b { font-weight: normal; }
|
|
|
|
|
i m working on my study project. i divided that in different modules, now i need to call one module from another module.
|
|
|
|
|
You're going to have to supply ALOT more information than that. What do you want to call, specifically? Some code snippets might help too.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
simply the person wants to open an exe file from the C#.
|
|
|
|
|
|
The way you asked the question, "module" could mean anything. In this case, another .EXE was the last thing I would have guessed. I was thinking maybe something in a referenced .DLL, or trying to call a method in a class, or maybe something in another namespace, ...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
What are all the way to play an .avi file in my application other these:
Video object of Direct Show
mciSendString (c++ for c#)
using windows media player COM
|
|
|
|
|
Hello all,
I need to prevent user from closing the form if he modify any field and ask him if want save or not?
Please help
Thanks
hay
|
|
|
|
|
Hi.
Take a look on the FormClosing-Event. With e.Cancel in the EventArgs e you can prevent the user from clsoing the Form.
|
|
|
|
|
Hi...
I'm writing a Windows Service in C# that when started opens a socket (Listening Port) that reads ethernet frames, inspects the payload, and logs to a DB certain data within the payload. Obviously I want the frames to be processed at a speed that doesnt' cause any lost packets.
So, do I create a thread for each received frame, to keep the main thread from
being blocked? Do I use a thread pool manager? What's the best design for processing the frames in real-time or close to real-time as possible?
Any suggestions/code snippets would be greatly appreciated.
Thanks,
Tom
thomas.paluzzi@havensolutionsgroup.com
|
|
|
|