Click here to Skip to main content
15,894,291 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to draw a rectangle on the picture box Pin
Henry Minute14-Oct-10 23:44
Henry Minute14-Oct-10 23:44 
AnswerRe: how to draw a rectangle on the picture box Pin
Pete O'Hanlon14-Oct-10 23:41
mvePete O'Hanlon14-Oct-10 23:41 
QuestionForm loses focus [modified] Pin
electriac14-Oct-10 13:05
electriac14-Oct-10 13:05 
AnswerRe: Form loses focus Pin
fjdiewornncalwe14-Oct-10 13:17
professionalfjdiewornncalwe14-Oct-10 13:17 
GeneralRe: Form loses focus Pin
electriac14-Oct-10 13:24
electriac14-Oct-10 13:24 
GeneralRe: Form loses focus Pin
Nish Nishant14-Oct-10 13:33
sitebuilderNish Nishant14-Oct-10 13:33 
GeneralRe: Form loses focus Pin
fjdiewornncalwe14-Oct-10 13:35
professionalfjdiewornncalwe14-Oct-10 13:35 
GeneralRe: Form loses focus Pin
electriac14-Oct-10 14:00
electriac14-Oct-10 14:00 
I'm afraid I still have the problem. I thought that the problem had been solved as clicking on the button caused the key commands to work. In actuality clicking the button was bringing the focus to the form. Here is the code with no button which loses focus.

public WMP(string filename)
        {
            InitializeComponent();
            this.axWMP.KeyPressEvent += new AxWMPLib._WMPOCXEvents_KeyPressEventHandler(this.axWMP_KeyPressEvent);
            fname = filename;
            axWMP.settings.autoStart = false;
            axWMP.URL = fname;
            axWMP.Ctlcontrols.play();
            axWMP.Focus();
        }
        // At this point if I press a key the keystroke is reported to some other window.
        // If I click on this Window the keystroke will be reported here. How can I keep the 
        // focus on this window.

        private void axWMP_KeyPressEvent(object sender, AxWMPLib._WMPOCXEvents_KeyPressEvent e)
        {
            label1.Text = "key press = " + e.nKeyAscii.ToString(); 
        }

GeneralRe: Form loses focus [modified] Pin
fjdiewornncalwe14-Oct-10 14:08
professionalfjdiewornncalwe14-Oct-10 14:08 
GeneralRe: Form loses focus Pin
electriac14-Oct-10 14:14
electriac14-Oct-10 14:14 
GeneralRe: Form loses focus Pin
OriginalGriff15-Oct-10 2:03
mveOriginalGriff15-Oct-10 2:03 
GeneralRe: Form loses focus Pin
fjdiewornncalwe15-Oct-10 4:32
professionalfjdiewornncalwe15-Oct-10 4:32 
QuestionRe: Form loses focus Pin
Luc Pattyn15-Oct-10 2:19
sitebuilderLuc Pattyn15-Oct-10 2:19 
AnswerRe: Form loses focus Pin
electriac15-Oct-10 2:35
electriac15-Oct-10 2:35 
GeneralRe: Form loses focus Pin
Luc Pattyn15-Oct-10 2:46
sitebuilderLuc Pattyn15-Oct-10 2:46 
GeneralRe: Form loses focus Pin
fjdiewornncalwe15-Oct-10 4:36
professionalfjdiewornncalwe15-Oct-10 4:36 
AnswerRe: Form loses focus Pin
fjdiewornncalwe15-Oct-10 4:33
professionalfjdiewornncalwe15-Oct-10 4:33 
GeneralRe: Form loses focus Pin
Paw Jershauge15-Oct-10 1:38
Paw Jershauge15-Oct-10 1:38 
QuestionHow to put a rsa private key "hiden" in the code, and encrypt something with RSA! Sending the public key to decrypt. Pin
Ongcos14-Oct-10 7:04
Ongcos14-Oct-10 7:04 
AnswerRe: How to put a rsa private key "hiden" in the code, and encrypt something with RSA! Sending the public key to decrypt. Pin
Alegria_Lee14-Oct-10 21:05
Alegria_Lee14-Oct-10 21:05 
GeneralRe: How to put a rsa private key "hiden" in the code, and encrypt something with RSA! Sending the public key to decrypt. Pin
Ongcos14-Oct-10 22:21
Ongcos14-Oct-10 22:21 
GeneralRe: How to put a rsa private key "hiden" in the code, and encrypt something with RSA! Sending the public key to decrypt. [modified] Pin
Ongcos15-Oct-10 2:05
Ongcos15-Oct-10 2:05 
GeneralRe: How to put a rsa private key "hiden" in the code, and encrypt something with RSA! Sending the public key to decrypt. Pin
Alegria_Lee15-Oct-10 3:06
Alegria_Lee15-Oct-10 3:06 
GeneralRe: How to put a rsa private key "hiden" in the code, and encrypt something with RSA! Sending the public key to decrypt. Pin
Ongcos17-Oct-10 22:51
Ongcos17-Oct-10 22:51 
GeneralRe: How to put a rsa private key "hiden" in the code, and encrypt something with RSA! Sending the public key to decrypt. Pin
Alegria_Lee18-Oct-10 4:34
Alegria_Lee18-Oct-10 4:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.