|
You need to install a keyboard hook (You don't need a low-level hook for your purpose).
The first option would be to search and use one of the things already written in C#. (Hint: another user has already given you a link to such an article)
Secondly, there are plenty of hooks already written in as DLLs in C++ and you can just use one of those from your C# app after modifying the C++ code to trap the Windows key (0x5B and 0x5C) and ensuring the exported calling convention in the DLL is 'right' for your use.
Thirdly, you can read the docs and write your own hook and give me a shock!
Now - you've been asking this for a while. Where *exactly* is the problem and what code have you written so far?
Cheers,
Rajesh R Subramanian.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hi ,
I wud like to implement the backspace button functionality to my button in the form. Plz help me by giving code
|
|
|
|
|
What is a Backspace button? Explain what you want to achieve Clearly
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
the function of backspace button in key board
|
|
|
|
|
Use the key events on the form to check for a backspace key. When you detect the backspace key press then you need to implement the functionality you want.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Hi,
I hav a textbox anda button on my screen when i press button on the screen it shud delete the text in the textbox
ex: as Backspace on the key board works
|
|
|
|
|
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.
|
|
|
|