|
I will explore it the moment I get home from work
|
|
|
|
|
Good hope it will help you, otherwise I guess exists libraries which you can use to accomplish your task.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.cacttus.com
|
|
|
|
|
It didn't work out for me
It doesn't seem to work for windows 7 vs 2010 ultimate
|
|
|
|
|
Maybe try to work with Microsoft Expression Encoder Screen Capture
|
|
|
|
|
I checked it out and the free version has a 10minute recording limite + I don't know if can embed it in my program
The best thing should be a library i could call to
Because i would like to write the recorder myself
|
|
|
|
|
You can try camstudio, it is a screen capture software. If the frame/sec is not fast enough, I remember Microsoft has a SDK (Direct show or ?) for this screen capture.
from Athena Solution (www.athena-solution.com)
|
|
|
|
|
If you're using XP, I think Windows Media Encoder may be an option.
I believe that it can be automated.
Not supported under Windows 7 though...
replace by Expression Encoder which doesn't seem to be free.
|
|
|
|
|
Hello.
I'm trying upload a file which name contains '#', for example: '#1.doc', or 'myFile#125.exe' to WebDAV Server, which is running on Linux.
I use HttpUtility.UrlEncode() Method for encoding URL, but everytime the result will be files with name '1.doc' and 'myFile' on the server.
Please, give some advice.
Thank you.
|
|
|
|
|
Can you please show us the code?
HttpUtility.UrlEncode() Method will replace the
# with
%23
Better, try your code without this method.
// ♫ 99 little bugs in the code,
// 99 bugs in the code
// We fix a bug, compile it again
// 101 little bugs in the code ♫
|
|
|
|
|
|
I do use HttpUtility.UrlEncode().
But it's not replacing # to %23, simply, leaving it as it is.
So, I replaced # to %23 manually.
Now it's working.
Thank you.
|
|
|
|
|
Uri.EscapeDataString
Should encode '#' (as well as others).
|
|
|
|
|
Thank you.
This is really a helpful method.
|
|
|
|
|
List<string> savedControls = new List<string>();
List<Control> formControls = new List<Control>();
private void button2_Click(object sender, EventArgs e)
{
savedControls.Clear(); formControls.Clear();
StreamReader sr = new StreamReader(path + "\\settings.txt");
string s = sr.ReadToEnd();
RichTextBox text = new RichTextBox();
text.Text = s;
foreach (Control c in this.Controls)
{
formControls.Add(c);
}
for (int i = 0; i <= text.Lines.Length - 1; i++)
{
savedControls.Add(text.Lines[i]);
}
for (int i = 0; i <= formControls.Count - 1; i++)
{
for (int j = 0; j <= savedControls.Count - 1; j++)
{
if (savedControls[j].Contains(formControls[i].Name))
{
savedControls[j] = savedControls[j].Replace(formControls[i].Name + "=", "");
}
}
}
sr.Close();
}
|
|
|
|
|
I am trying with this little code:
foreach (NumericUpDown num in this.Controls)
{
if (num.Name == formControls[i].Name)
{
num.Value = int.Parse(savedControls[j]);
break;
}
}
but it throws errors:
<br />
System.InvalidCastException was unhandled<br />
Message=Unable to cast object of type 'System.Windows.Forms.ProgressBar' to type 'System.Windows.Forms.NumericUpDown'.
|
|
|
|
|
Try this code instead:
foreach (Control num in this.Controls)
{
if ( ! ( num is NumericUpDown ) )
continue;
NumericUpDown numeric = (NumericUpDown)num;
if (numeric.Name == formControls[i].Name)
{
numeric.Value = int.Parse(savedControls[j]);
break;
}
}
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
its working ...thanks [Richard Andrew x64]
I must test it for other values and other controls...so until then this remain a open post.
|
|
|
|
|
this.Controls contains a set of all controls.
Since you need to access only a particular control, have a check (case or if statement) just for that type of control.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
|
|
|
|
|
I'm working on a project which is by C# language. I want to produce a Dictionary which is similar to Narcis or Easylingo that able the user to use the mouse and just move the cursor on the WORD in any application then the program detect the word and will find the meaning for that particular word.
My question is How I can detect the word which is under the Mouse Cursor on the screen in any application such as Microsoft office or Web browsers, etc.
I'm looking for any tips and guide or any Codes which can help me.
Your cooperation is highly appreciated.
|
|
|
|
|
I wonder if you can't grab an image of the area around the mouse position (like snaggit or something) and run that through some OCR library to parse out any text.
If you think you are going to be able to write a generic hook into any program to grab the text, good luck with that.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
You're going to have to OCR the screen around the mouse. There is no consistent way to get the text under the mouse cursor in every application window. WM_GETTEXT is not supported by every window.
|
|
|
|
|
Sounds like a CPU-hogging "solution".
Bastard Programmer from Hell
|
|
|
|
|
Yep, but you could make it less of a hog by only doing the OCR on a right-click.
|
|
|
|
|
I still think it's an exotic solution; you'd have to account for the resolution of the current desktop, and copy a part of it without knowing the size of the font under the word.
Bastard Programmer from Hell
|
|
|
|
|
Yep, it is. But I don't know of another way to get the text under the mouse that works with all controls...
|
|
|
|
|
Do any of you use the VS2010 Profiler regularly? If so, in what cases do you use it? I know there are plenty of paid profilers around, as well as free (IIRC, not entirely sure).
I ask because I recently ran into some terribly slow performance in a database-driven application. I did not have access to any 3rd-party profiling applications. So I ran the profiler in VS. It helped me discover that I had mistakenly created a loop which opened the database connection, queried it and the closed the connection for EACH iteration in the loop. This took approximately 27 seconds seeing as how there was close to 2,000 records in the table. The profiler told me that the majority of the time was taken up by DbConnection.Disconnect() inside this method. That's when I found the problem. Once I fixed it I can now run the same code with MORE THAN 2,000 records in the table and it takes ~7 seconds.
I think I should start using the profiler more often. Haha. Any input would be nice. I wasn't entirely sure if this was the correct forum but I develop C# applications.
|
|
|
|