Advertisement
Guest User

Fox.PictureBox.Image Fade Error

a guest
Nov 14th, 2011
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.91 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 Fox536
  11. {
  12.     static class Program
  13.     {
  14.         /// <summary>
  15.         /// The main entry point for the application.
  16.         /// </summary>
  17.         [STAThread]
  18.         static void Main()
  19.         {
  20.             Application.EnableVisualStyles();
  21.             Application.SetCompatibleTextRenderingDefault(false);
  22.             Application.Run(new Form1());
  23.         }
  24.     }
  25.  
  26.     public partial class Form1 : Form
  27.     {
  28.         string ImgPath = "C:\\test.png";
  29.         public Form1()
  30.         {
  31.             this.Size = new Size(1000, 71);
  32.             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
  33.             PictureBox picBox = new PictureBox();
  34.             this.Controls.Add(picBox);
  35.             picBox.Image = Image.FromFile(ImgPath);
  36.             picBox.Dock = DockStyle.Fill;
  37.             picBox.SizeMode = PictureBoxSizeMode.StretchImage;
  38.         }
  39.     }
  40. }
  41.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement