资源简介
用C#开发的图片处理软件,非常适合C#的学习,作为平时的课程设计作业也很好。
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using Microsoft.Win32;
using System.Runtime.InteropServices;
using System.Drawing.Imaging;
namespace PictureManage
{
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
}
#region 自定义方法
public int Pindex;
public string TPath()
{
string TemporaryPath;
TemporaryPath = Application.StartupPath.ToString();
TemporaryPath = TemporaryPath.Substring(0 TemporaryPath.LastIndexOf(“\\“));
TemporaryPath = TemporaryPath.Substring(0 TemporaryPath.LastIndexOf(“\\“));
TemporaryPath += @“\TemporaryFolder“;
return TemporaryPath;
}
public void ToolStatusUnable()
{
contextMenuStrip1.Enabled = false;
设为桌面背景ToolStripMenuItem1.Enabled = false;
转换为ToolStripMenuItem.Enabled = false;
删除ToolStripMenuItem1.Enabled = false;
重命名ToolStripMenuItem1.Enabled = false;
另存为ToolStripMenuItem1.Enabled = false;
toolStripButton2.Enabled = false;
toolStripButton3.Enabled = false;
toolStripButton4.Enabled = false;
打印ToolStripMenuItem1.Enabled = false;
图片特效ToolStripMenuItem.Enabled = false;
图片调节ToolStripMenuItem.Enabled = false;
toolStripButton5.Enabled = false;
toolStripButton6.Enabled = false;
图片文字ToolStripMenuItem.Enabled = false;
toolStripButton7.Enabled = false;
}
public void ToolStatusEnable()
{
contextMenuStrip1.Enabled = true;
设为桌面背景ToolStripMenuItem1.Enabled = true;
转换为ToolStripMenuItem.Enabled = true;
删除ToolStripMenuItem1.Enabled = true;
重命名ToolStripMenuItem1.Enabled = true;
另存为ToolStripMenuItem1.Enabled = true;
toolStripButton2.Enabled = true;
toolStripButton3.Enabled = true;
toolStripButton4.Enabled = true;
打印ToolStripMenuItem1.Enabled = true;
图片特效ToolStripMenuItem.Enabled = true;
图片调节ToolStripMenuItem.Enabled = true;
toolStripButton5.Enabled = true;
toolStripButton6.Enabled = true;
图片文字ToolStripMenuItem.Enabled = true;
toolStripButton7.Enabled = true;
}
#endregion
#region 调用API
[DllImport(“user32.dll“EntryPoint=“SystemParametersInfoA“)]
static extern Int32 SystemParametersInfo(Int32 uActionInt32 uParamstring lpvparamInt32 fuwinIni);
private const int SPI_SETDESKWALLPAPER=20;
#endregion
#region 窗体加载
private void frmMain_Load(object sender Even
评论
共有 条评论