|
it works, but after I insert another 4 characters, "-" is not inserted.
|
|
|
|
|
Please edit your original post and add your reworked code in a second code-block.
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
On second thought, the modulo operator-approach isn't really well suited here, because due to inserting the dashes, the length of the text won't be a multiple of 4 at the positions where the next dash should be inserted. I would recommend a MaskedTextBox instead with an input mask like 0000\-0000\-0000\-0000
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
I can insert only numbers..
|
|
|
|
|
|
Is ok, I solved it. Thank you !
|
|
|
|
|
Too late I already replied ;o)
You're welcome!
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
is this a web app or windows app? If it is windows then you can use Masked Input and if it is web then you can use Jquery, don't need to hit server every time..
|
|
|
|
|
Is win form. I will try, thanks!
|
|
|
|
|
|
I've used masked textbox many times, just remember to set the mask and it will do all the work for you.
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
How Can I Export Database From Sql Server To Sql Server Ce
|
|
|
|
|
|
|
Tridip Bhattacharjee wrote: all .net colletion related class follow the BTree algo ? None.
Usefull for harddisks with slow access time. What tree are you looking for, and what would you expect it to do? Or did you come across it and become interested? In that case, there's a lot more variants
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
I need to change the icon of the resulting .exe for my application programmatically at runtime. The path to the icon will be read form a file. I know it's possible to change the icon through: Project >> Properties >> Common Properties >> General >> Application Icon. I was reading at msdn to find the answer. It seems possible to change it but I just couldn't understand how. If anyone has done this before any help would be appriciated.
I'm using Microsoft Visual Studio .NET 2008
|
|
|
|
|
Set the Icon property of your form - that alters the runtime icon shown in the control box at the top left, and the taskbar.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I wanna the exe icon change!!
|
|
|
|
|
You cannot, it is technically not possible.
What you are seeing is a "link" to that file, and yes, that can have its own icon.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
Perhaps other readers might be wondering "what error"
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
That's nice and all, but you can NOT change the icon of your .EXE while it's running. The file is locked by the system until the .EXE quits. You have to change it from another executable in order for this to work.
|
|
|
|
|
You have been here four years - that's long enough for you to know that you need to tell us what you want because we can't see your screen, access your HDD, or read your mind. So explain: which icon do you want to change at run time (there are several places your app icon can appear)? Where? When? And probably most important, why?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
hi!
I'm trying to rotate a simple point over another one, here is the code:
x = (x - x1) * (Math.Cos(1)) - (y - y1) * Math.Sin(1) + x1;
y =(x - x1)*(Math.Sin(1)) + (y - y1)*Math.Cos(1) + y1;
Point1.Location = new Point((int)x,(int)y);
but it's seem that the rotation go like a shell of snail to direction of the origin(x1,y1) and then stops;
maybe I should round the double x and y and convert them to int, because when converting directly, I'm just close that make the number degrade is that the problem?
|
|
|
|