• 大小: 0.04M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-26
  • 语言: C#
  • 标签: 图片  

资源简介


资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Windows.Forms;
using System.Drawing.Imaging;

namespace BuntForms
{
    public partial class Frm_Main : Form
    {
        Image myImage;
        public Frm_Main()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender EventArgs e)
        {
            openFileDialog1.Filter = “*.jpg*.jpeg*.bmp|*.jpg;*.jpeg;*.bmp“; //设置文件的类型
            openFileDialog1.ShowDialog(); //打开文件对话框
            myImage = System.Drawing.Image.FromFile(openFileDialog1.FileName); //根据文件的路径实例化Image类
            this.BackgroundImage = myImage; //显示打开的图片
     

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2011-12-22 23:11  BuntForms\
     文件         917  2013-05-30 21:32  BuntForms.sln
     文件       25088  2010-11-04 01:59  BuntForms.suo
     目录           0  2011-12-22 23:11  BuntForms\bin\
     目录           0  2013-05-30 21:33  BuntForms\bin\Debug\
     文件        9216  2013-05-30 21:33  BuntForms\bin\Debug\BuntForms.exe
     文件       24064  2013-05-30 21:33  BuntForms\bin\Debug\BuntForms.pdb
     文件        4022  2013-05-30 21:32  BuntForms\BuntForms.csproj
     文件        2011  2010-07-13 17:47  BuntForms\Frm_Main.cs
     文件        3177  2010-07-13 17:37  BuntForms\Frm_Main.designer.cs
     文件        6017  2010-07-13 17:37  BuntForms\Frm_Main.resx
     目录           0  2011-12-22 23:11  BuntForms\obj\
     目录           0  2013-05-30 21:33  BuntForms\obj\Debug\
     文件        4489  2013-05-30 21:33  BuntForms\obj\Debug\BuntForms.csproj.FileListAbsolute.txt
     文件         850  2013-05-30 21:33  BuntForms\obj\Debug\BuntForms.csproj.GenerateResource.Cache
     文件        1757  2013-05-30 21:32  BuntForms\obj\Debug\BuntForms.csprojResolveAssemblyReference.cache
     文件        9216  2013-05-30 21:33  BuntForms\obj\Debug\BuntForms.exe
     文件         180  2013-05-30 21:33  BuntForms\obj\Debug\BuntForms.Frm_Main.resources
     文件       24064  2013-05-30 21:33  BuntForms\obj\Debug\BuntForms.pdb
     文件         180  2013-05-30 21:33  BuntForms\obj\Debug\BuntForms.Properties.Resources.resources
     文件        7146  2013-05-30 21:32  BuntForms\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     目录           0  2011-12-22 23:11  BuntForms\obj\Debug\Refactor\
     目录           0  2013-05-30 21:32  BuntForms\obj\Debug\TempPE\
     文件        4608  2013-05-30 21:32  BuntForms\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll
     文件         493  2010-07-08 22:36  BuntForms\Program.cs
     目录           0  2011-12-22 23:11  BuntForms\Properties\
     文件        1350  2009-02-24 00:18  BuntForms\Properties\AssemblyInfo.cs
     文件        2858  2013-05-30 21:32  BuntForms\Properties\Resources.Designer.cs
     文件        5612  2009-02-24 00:18  BuntForms\Properties\Resources.resx
     文件        1109  2013-05-30 21:32  BuntForms\Properties\Settings.Designer.cs
     文件         249  2009-02-24 00:18  BuntForms\Properties\Settings.settings
............此处省略0个文件信息

评论

共有 条评论