Results 1 to 7 of 7

Thread:

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    tonerstationbg IgIv's Avatar
    Join Date: May:2005
    Location:
    Posts: 4,090

    , VC++ 2008. , , ? PgUp, PgDn, Home End , - .
    :


    :
    ...
    this->KeyDown += (gcnew System::Windows::Forms::KeyEventHandler( this, &MoveForm::Move_KeyPress));
    ...
    ...
    ...
    private: System::Void Move_KeyPress(Object^ sender, System::Windows::Forms::KeyEventArgs^ e)
    {
    switch (e->KeyCode)
    {
    case Keys::d1 :{break;};
    case Keys::d2 :{break;};
    case Keys::d3 :{break;};
    case Keys::d4 :{break;};
    case Keys::d5 :{break;};
    case Keys::Escape:{Form::Close();};
    case Keys::Up:{break;};
    }
    e->Handled = true;
    }



    - , .
    , - , - .

  2. #2
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    (Form) KeyPreview true?

  3. #3
    tonerstationbg IgIv's Avatar
    Join Date: May:2005
    Location:
    Posts: 4,090
    , , .
    :
    , :
    this->KeyPreview = true;
    this->KeyDown += (gcnew System::Windows::Forms::KeyEventHandler( this, &MoveForm::Move_KeyPress));
    Last edited by IgIv; 19th September 2016 at 10:19. Reason:
    , - , - .

  4. #4
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    , ( ). handle- , , Return . , .
    ( ) IsInputKey , true ( btw ). , .
    PreviewKeyDown event-a ( - e->isInputKey = true; , ), event-a , .
    Handler-a , / PreviewKeyDown.
    Last edited by tedych; 19th September 2016 at 12:09.

  5. #5
    tonerstationbg IgIv's Avatar
    Join Date: May:2005
    Location:
    Posts: 4,090
    , .
    , - , - .

  6. #6
    Registered User hateras's Avatar
    Join Date: Jan:2011
    Location: Kronos III
    Posts: 1,028
    ASRock B550M Pro 4; Ryzen R5 3600; 2x16 GiB G.SKILL Aegis 3200; 1TB Samsung QVO 960 + 3TB Seagate IronWolf; Zalman Z1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |