|
Hello,
Again I'm not sure if I understand your question correct.
But I'm trying to answer.
If it's limited to a special control, you could use the KeyPress event of that control like:
if (e.KeyChar == yourcharacter)
{
//If you whant to click a button, you could use the PerformClick method.
yourbutton.PerformClick();
}
Hope it helps!
All the best,
Martin
|
|
|
|
|
:\
i don't mean clicking a button in my form...i mean clicking the mouse\keys...the physical ones...like the auto clickers for games like MUOnline, or VistaTask...just click a keyboard key\mouse.
|
|
|
|
|
SendKeys.Send()?
You want to click the physical keys though? Maybe make something out of lego?
Russell
|
|
|
|
|
err...what's SendKeys? and no..not lego >_>
and what about clicking the mouse?
|
|
|
|
|
^
Hopefully explains something about SendKeys.
I'm not sure if it will send key presses to a different app though. I assume you are trying to write an app to autoclick into another process. You want to be a bit careful doing this as some games will ban you for such behaviour.
Russ
|
|
|
|
|
Hello,
Mabe this freewaretool helsp you.
It's not C#.
It can be programend in a kind of script language.
Can simulate mouseclicks and keypress, and much more!
All the best,
Martin
|
|
|
|
|
how can i get the data that i am entering in a text box and display it as a subitem in a list control?
|
|
|
|
|
err..ListBox1.Items.Add(textBox1.Text);
|
|
|
|
|
thank you. can you also tell me how to make it enter for a particular field like row=0, column=3.
|
|
|
|
|
Hello everybody,
Basically the problem is that the UTF8Encoder is not able to get this char '²'.
Is this a known fact, or am I doing something wrong?
This is what I do in a test routine:
using (FileStream fs = File.OpenRead(filename))
{
byte[] b = new byte[10000];
UTF8Encoding temp = new UTF8Encoding(false,true);
int l=0;
FileStream fw= File.Open("copy.txt",System.IO.FileMode.Create);
while ((l = fs.Read(b,0,b.Length)) > 0)
{
string s= temp.GetString(b, 0, l);
Console.WriteLine(s);
}
fw.Close();
}
Thanks for your time and help
All the best,
Martin
|
|
|
|
|
Can your console output the character even if it is read correctly? If your console code page does not support it your program won't display it.
UTF8 is multibyte, so your read operation might split the byte stream in the middle of a character. Create a StreamReader with Encoding.UTF8 to avoid having to deal with this manually.
Edit: Are you sure your file is actually UTF-8 encoded?
|
|
|
|
|
Hello,
First, thanks for youre time!
Actually I started by using a StreamReader, with the result that the complete line was there but without the '²' character.
Any other suggestions?
All the best,
Martin
|
|
|
|
|
First of all, check the source file (in my experience the most likely error). The character should be encoded with the byte sequence C2 B2.
As a quick hack to test it rename the input file so it has a bin extension and load it in Visual Studio - you should now see the byte content in a hex format.
|
|
|
|
|
Hmm,
I did the test with following result "B2" and no character is shown.
When I open it with the "TotalComander" Bin style, it's also "B2" but the '²' is shown.
So uses UTF8 really multibyte, or only for special characters?
Thanks again for your time and patiance.
All the best,
Martin
|
|
|
|
|
UTF-8 use more than one byte for anything over Unicode character 127. Some refers to these as special, others refer to English characters as special.
|
|
|
|
|
|
Hello,
It really looks like the file isn't really UTF8. (It's a XML file with a discribtion that says its UTF8 formated )
But I don't know wich encode I have to use.
Is there a way to find this out?
All the best,
Martin
|
|
|
|
|
Yes, this is seen before - it's an invalid XML file, a lot of programs spit those out.
A fair guess is the local ANSI codepage whereever the file was saved. For most Western European languages, this would be the Windows codepage 1252 (or use Encoding.Default if the encoding is the same on the machine reading and writing the file).
|
|
|
|
|
Bulls Eye
Thanks very much!
I'm now using the GetEncoder method, and "Windows-1252" as the parameter.
All the best,
Martin
|
|
|
|
|
I NEED TO USE the MaskedTextBox but i have 4 problem with it
1- my format 2ill be it that style(number1,number2)
first i don't know how may digits will be in number1
number2 will have only 3digit
i don't know how to make number1 with no fixed digits
2-i need the style that he make in textbox like(_____,____)not to appear because my client know how they will write the numbers but i used that control for validation
3- if i didn't right any digit in numer1 it add automitc 0
4- in number2 if i write 33 it appear like that ,330
plz answer me tody i wantto finish that task today
ma_refay
|
|
|
|
|
Hi,
I would like a simple c# function that causes a page to wait for a predetermined length of time before closing but am unsure of what to search for so I keep returning irrelivant results. Please can someone help.
many thanks
mark
|
|
|
|
|
Use Timer in Windows Forms. If event "tick" comes, then close your form.
|
|
|
|
|
You could always use sleep.
|
|
|
|
|
i need to write textbox in customformat like "111,111" how to execute that format {windows application c#2005)
ma_refay
-- modified at 6:06 Tuesday 20th February, 2007
|
|
|
|
|