|
You can write your custom Backspace function in Button_Click event, something like this:
Button_Click()
{
if (TextBox != "")
TextBox.Remove(LastCharacter);
}
Regards
While (true) { Human.isLearnable = true; }
|
|
|
|
|
Ok so your first shot at explaining your problem was not very good. This one is much better, and Pedram has supplied an answer, well done for persisting.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I'm tired of balancing the votes on your post. You have a fan I guess.
Cheers,
Rajesh R Subramanian.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Rajesh, I appreciate the effort but you need not bother, I am happy to ignore the voting thingy. I like to see the odd 5 when I manage to get in a particularly witty response and I enjoy them when I can help someone but a univoter can be ignored.
Besides I am not a polite person so I expect to irritate someone sometime and a univote is often the only response they have.
Thank you...
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
try to use the ASCII code for backspace instead of using the enum Key
|
|
|
|
|
Hi all,
I am trying to export image to PDF file using iTextSharp dll.
I created a PDF file(test.pdf) and added image to that pdf file. But the problem is when the image is too large ,its not showing the full image in pdf file.
when the image height is large, i am automatically getting the vertical scroll bar in pdf file. but for width i am not getting any horizontal scroll bar.
Please suggest me how to export large images to pdf file without resizing the image. I s there any way to get the horizontal & vertical scroll for PDF file.
Thanks in advance
|
|
|
|
|
Is there anyway to get this expression to work without getting an overflow execption?
Answer = (PublicKeyB^PrivateKeyA)Mod(PublicKeyA)
the public and private keys are supposed to be 9 digit numbers example: 123456789
i've tryed using System.Math.Pow but it uses Doubles and thats the source of the overflow
anyway, i would like to know if its posible and if it is, how?
|
|
|
|
|
As you are using the Mod operator, I think that you mean the VB meaning of the ^ operator. In C# the ^ operator means an exclusive or, and doesn't cause an overflow.
One nine digit number to the power of another nine digit number is way too large to fit in any integer type (unless you have a 32000000000 bit integer laying around...). It's even way too large to fit in a double or a decimal.
What is it that you try to accomplish with this calculation? It doesn't really make any sense.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
the formula i wrote there is not any kind of code, it is written in human language, i know for ^ i should use Pow(base,exponent) and for Modulus i should use %;
it is supposed to be a formula to calculate a value in order to calculate another value to prove the basis of cryptography to my teacher in classroom. (it is supposed to be somehting simple)
anyway, i just wanted to know if it was possible to do without getting an overflow
|
|
|
|
|
I think that the .Net framework 3.0 or 3.5+ ships with a class named BigInteger that can fit your needs.
There are a lot of similar free classes available (I beleave at least one in CodeProject and one in the mono project)
|
|
|
|
|
Hello,
I am trying to create a dll using c++ that I can then use and call functions out of in C#. I have a general idea of what to do, but I don't know the specifics. I am using visual studio 2005. What type of project should I create in c++? Does anyone know of any source code out there that might have some simple exambles? Once I have created my dll, I add it to C# as a reference. But after that what do I do?
|
|
|
|
|
You would use Platform Invoke to call from C# into the DLL.
Read the help for Platform Invoke.
“Cannot find REALITY.SYS...Universe Halted.”
~ God on phone with Microsoft Customer Support
|
|
|
|
|
Depends, if your using the .Net framework for the c++ DLL then you use it like any other class. If you're not using the .Net framework for the c++ dll then you will have to use P/Invoke
As for the type of project to make, I think you just need to make a Class Library.
My current favourite word is: Nipple!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
Is there any specific reason why you need the dll in C++? If your C++ dll is on .NET framework, you can directly add reference to your c# project. Alternatively, you can use C++/CLI other than C#. So you can use the C++ classes by just importing the necessary headers.
|
|
|
|
|
Hello Friends,
protected void grdEncounter_RowDataBound(object o, GridViewRowEventArgs e)
{
GridViewRow grdEditRow = e.Row;
if (grdEditRow.RowType.Equals(DataControlRowType.Header))
return;
grdEditRow.Cells[2].Text = grdEditRow.Cells[2].Text.Equals("1") ? "Yes" : "No";
}
error comes in above line
Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: index
This is the error while loading itself i don't know how to solve.
Regards
JK
|
|
|
|
|
seems like your grdEditRow.Cells doesn't have a cell with index = 2
Intelligence is almost useless for those who have nothing else!
Email: caiokf@gmail.com
|
|
|
|
|
I suspect that grdEditRow.Cells[2] doesn't exist for some reason. Try running in debug and have a look exactly where it errors and you should be able to see the cause.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
You already got replies here[^], here[^] and here[^]. Please keep your question in a single thread, and follow up on the replies that you get.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I have to get the price (currency) from a database table, but I can not assign double & Decimal variable to it, which define type I should use?
|
|
|
|
|
If you're using SQL Server use SqlDbType.Money or SqlDbType.SmallMoney .
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Unfortunately I had MS Access database instead, but when I used VB.net then I defined Decimal type is OK!
Also I can not re-define the database differently, because other applications are still using them (VC++)
Any new suggestion?
Thank
|
|
|
|
|
Could you post the parts of the code that are not working. I don't quite see why decimal wouldn't work.
Also are getting an exception. If so, what is it?
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Hi,
I need to create a list box with 4 columns: text, 2 radio buttons & a check box. I am using VS2003. Can somebody let me know how to get about to do this or if there is an alternative way around it.
Any help would be greatly appreciated.
|
|
|
|
|
|
Could not resist having a go at the moniker
Never underestimate the power of human stupidity
RAH
|
|
|
|