Advertisement
DrAungWinHtut

Beginner Codes

Feb 9th, 2022
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.39 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace _2022020801PhotoAlbum2
  12. {
  13.     public partial class frmPhotoAlbum : Form
  14.     {
  15.         public frmPhotoAlbum()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.  
  20.         private void btnHidePhoto_Click(object sender, EventArgs e)
  21.         {
  22.             picAlbum.Visible = false;
  23.         }
  24.  
  25.         private void btnShowPhoto_Click(object sender, EventArgs e)
  26.         {
  27.             picAlbum.Visible=true;
  28.         }
  29.  
  30.         private void hidePhotoToolStripMenuItem_Click(object sender, EventArgs e)
  31.         {
  32.             picAlbum.Visible = false;
  33.         }
  34.  
  35.         private void showPhotoToolStripMenuItem_Click(object sender, EventArgs e)
  36.         {
  37.             picAlbum.Visible = true;
  38.         }
  39.  
  40.         private void exitToolStripMenuItem_Click(object sender, EventArgs e)
  41.         {
  42.             Application.Exit();
  43.         }
  44.  
  45.         private void btnChangePhoto_Click(object sender, EventArgs e)
  46.         {
  47.             picAlbum.Image = Image.FromFile("D:\\microbit.png");
  48.         }
  49.  
  50.         private void btnChangePhoto2_Click(object sender, EventArgs e)
  51.         {
  52.             picAlbum.Image = Image.FromFile("D:\\kid.jpg");
  53.         }
  54.     }
  55. }
  56.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement