thieumao

ThuPictureBox.cs

Aug 31st, 2013
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.13 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.Windows.Forms;
  9.  
  10. namespace ThuPictureBox
  11. {
  12.     public partial class Form1 : Form
  13.     {
  14.         public Form1()
  15.         {
  16.             InitializeComponent();
  17.         }
  18.  
  19.         private void btBorder_Click(object sender, EventArgs e)
  20.         {
  21.             pbView.BorderStyle = BorderStyle.FixedSingle;
  22.         }
  23.  
  24.         private void btAnhNen_Click(object sender, EventArgs e)
  25.         {
  26.             Image anhnen = Properties.Resources.bg;
  27.             pbView.BackgroundImage = anhnen;
  28.         }
  29.  
  30.         private void btLoadAnh_Click(object sender, EventArgs e)
  31.         {
  32.             Image anh = Properties.Resources.ghost;
  33.             pbView.Image = anh;
  34.         }
  35.  
  36.         private void btKieuLoad_Click(object sender, EventArgs e)
  37.         {
  38.             pbView.SizeMode = PictureBoxSizeMode.Zoom;
  39.         }
  40.  
  41.         private void btLoadAnh2_Click(object sender, EventArgs e)
  42.         {
  43.             pbView.ImageLocation = "ghost.png";
  44.         }
  45.     }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment