Ejemplo n.º 1
0
        /// <summary>
        /// Form load event.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MainForm_Load(object sender, EventArgs e)
        {
            /*New instance was created from WinFormCaptcha and
             * was set necessary parameters.*/
            cp = new WinFormCaptcha(int.Parse(NumTextLength.Value.ToString()),
                                    PanelCaptcha.Width, PanelCaptcha.Height);

            //Captcha image was created and was set as background image of the panel's.
            PanelCaptcha.BackgroundImage = cp.DrawCaptcha();
            PictureBox v = new PictureBox();

            v.Image = cp.DrawCaptcha();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// This method is run when click refresh button.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void BtnRefresh_Click(object sender, EventArgs e)
 {
     //Captcha image was created and was set as background image of the panel's.
     PanelCaptcha.BackgroundImage = cp.DrawCaptcha();
 }