• 大小: 0.17M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-02-24
  • 语言: C#
  • 标签:

资源简介


资源截图

代码片段和文件信息

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

namespace ImgType
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        string imgpath;
        private void button1_Click(object sender EventArgs e)
        {
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                label1.Text = “图片路径:“+openFileDialog1.FileName;
                imgpath = openFileDialog1.FileName;
            }
        }

        private void button2_Click(object sender EventArgs e)
        {
            try
            {
                Bitmap bt = new Bitmap(imgpath);
                bt.Save(“c:\\1.bmp“ System.Drawing.Imaging.ImageFormat.Bmp);
                MessageBox.Show(“格式转换成功“);
            }
            catch { }
        }

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件         911  2009-02-06 14:58  sj\01\ImgType\ImgType.sln
     文件       13824  2009-02-06 15:18  sj\01\ImgType\ImgType.suo
     文件        1035  2009-02-06 15:17  sj\01\ImgType\ImgType\Form1.cs
     文件        3477  2009-02-06 15:16  sj\01\ImgType\ImgType\Form1.Designer.cs
     文件        6017  2009-02-06 15:16  sj\01\ImgType\ImgType\Form1.resx
     文件        3760  2009-02-06 15:00  sj\01\ImgType\ImgType\ImgType.csproj
     文件         488  2009-02-06 14:58  sj\01\ImgType\ImgType\Program.cs
     文件        8704  2009-02-06 15:17  sj\01\ImgType\ImgType\bin\Debug\ImgType.exe
     文件       24064  2009-02-06 15:17  sj\01\ImgType\ImgType\bin\Debug\ImgType.pdb
     文件       14328  2009-02-06 15:17  sj\01\ImgType\ImgType\bin\Debug\ImgType.vshost.exe
     文件         490  2007-07-21 01:33  sj\01\ImgType\ImgType\bin\Debug\ImgType.vshost.exe.manifest
     文件         548  2009-02-06 15:17  sj\01\ImgType\ImgType\obj\Debug\ImgType.csproj.FileListAbsolute.txt
     文件         847  2009-02-06 15:16  sj\01\ImgType\ImgType\obj\Debug\ImgType.csproj.GenerateResource.Cache
     文件        8704  2009-02-06 15:17  sj\01\ImgType\ImgType\obj\Debug\ImgType.exe
     文件         180  2009-02-06 15:16  sj\01\ImgType\ImgType\obj\Debug\ImgType.Form1.resources
     文件       24064  2009-02-06 15:17  sj\01\ImgType\ImgType\obj\Debug\ImgType.pdb
     文件         180  2009-02-06 15:14  sj\01\ImgType\ImgType\obj\Debug\ImgType.Properties.Resources.resources
     文件        1346  2009-02-06 14:58  sj\01\ImgType\ImgType\Properties\AssemblyInfo.cs
     文件        2864  2009-02-06 14:58  sj\01\ImgType\ImgType\Properties\Resources.Designer.cs
     文件        5612  2009-02-06 14:58  sj\01\ImgType\ImgType\Properties\Resources.resx
     文件        1092  2009-02-06 14:58  sj\01\ImgType\ImgType\Properties\Settings.Designer.cs
     文件         249  2009-02-06 14:58  sj\01\ImgType\ImgType\Properties\Settings.settings
     文件         923  2009-02-06 15:18  sj\02\GetAllFiles\GetAllFiles.sln
     文件       13824  2009-02-06 15:36  sj\02\GetAllFiles\GetAllFiles.suo
     文件        1040  2009-02-06 15:35  sj\02\GetAllFiles\GetAllFiles\Form1.cs
     文件        3350  2009-02-06 15:28  sj\02\GetAllFiles\GetAllFiles\Form1.Designer.cs
     文件        6022  2009-02-06 15:28  sj\02\GetAllFiles\GetAllFiles\Form1.resx
     文件        3768  2009-02-06 15:26  sj\02\GetAllFiles\GetAllFiles\GetAllFiles.csproj
     文件         492  2009-02-06 15:18  sj\02\GetAllFiles\GetAllFiles\Program.cs
     文件        8704  2009-02-06 15:35  sj\02\GetAllFiles\GetAllFiles\bin\Debug\GetAllFiles.exe
     文件       24064  2009-02-06 15:35  sj\02\GetAllFiles\GetAllFiles\bin\Debug\GetAllFiles.pdb
............此处省略44个文件信息

评论

共有 条评论