private void encryptToolStripMenuItem_Click(object sender, EventArgs e) { this.Close(); EncryptPicture en = new EncryptPicture(username, ppath, dpath); //EncryptPicture en = new EncryptPicture(); en.Show(); }
private void loadImagestoPanel(String imageName, String ImageFullName, int newLocX, int newLocY) { ppath = ImageFullName; EncryptPicture h = new EncryptPicture(); PictureBox ctrl = new PictureBox(); //ctrl.Image = Image.FromFile(ImageFullName); ctrl.Image = h.byteArrayToImage(File.ReadAllBytes(ImageFullName)); ctrl.BackColor = Color.Black; ctrl.Location = new Point(newLocX, newLocY); ctrl.Size = new System.Drawing.Size(sizeWidth, sizeHeight); ctrl.SizeMode = PictureBoxSizeMode.StretchImage; ctrl.MouseMove += new MouseEventHandler(control_MouseMove); pnControls.Controls.Add(ctrl); }