Jump to content

Dynamicly adding picture box on form

- - - - -

  • Please log in to reply
1 reply to this topic

#1
Tonchi

Tonchi

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 471 posts
  • Location:Varaždin
  • Programming Language:C, C++, C#
How can I add picture box on other form at same project when I press CTRL+PrtScr on first form???

#2
gregwarner

gregwarner

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 853 posts
  • Location:Arkansas
In the Control.KeyPress event handler for your form, test the KeyEventArgs.KeyCode against the Keys.ControlKey and Keys.PrintScreen values, and if true, declare a new PictureBox control and add it to your form using the form's Controls.Add() method.
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.

– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users