Search code examples
vb.netvisual-studio-2015clipboardkeypress

VB.net Application wide Copy and paste (Text)


Im trying to implement application wide copy and paste short cuts. (ctrl+C) etc.

The application consists of forms drawn in tab pages, and there are quite alot of forms. Ideally im after something (in the keypress of the main form) that would just see if the active control is a text box and If so pastes or copies text. Doing so on every text box on every form is unfeasible.

Another approach i guess would be to override the text box control application wide?

There must be an easy way to do this surely.

My googling so far hasn't come up with anything. Thankyou.


Solution

  • Ok; turns out there was a simple problem preventing this from working.

    The EDIT menu in the menu bar on the main parent form was 'consuming' these keyboard short cuts.

    Deleting this menu fixed the issue instantly.