void Form1::textBox9_KeyPress(System::Object^  sender, System::Windows::Forms::KeyPressEventArgs^  e)
{
	if(!Char::IsDigit(e->KeyChar) && (e->KeyChar != 0x08))
        e->Handled = true;
}

Thats the code i got, but, how could i allow CTRL+V.

if(Char::IsDigit(e->KeyChar))
    return;
    if(e->KeyChar=='\b')
    return;
    if(e->KeyChar=='\v')
    return;
    if(e->KeyChar=='CTRL')
    return;
    e->Handled=true;

This also doesn't work ._.

(Im using Visual Studio 2010)

Edited 5 Years Ago by Danny1994: n/a

If you enter ^v or backspace, you can display the integer value of the keys to find out what to compare the key value to.

Could anyone post code snippet, please ?

I tryed much differnt things, but they all didnt worked.

This question has already been answered. Start a new discussion instead.