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 arc
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string JpgFilePath = OpenJpg();
private string OpenJpg()
{
string JpgPath = "";
&nbs
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace arc
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string JpgFilePath = OpenJpg();
private string OpenJpg()
{
string JpgPath = "";
&nbs

这篇博客介绍了如何在C#中创建一个简单的应用程序,通过OpenFileDialog对话框让用户选择并读取JPG文件。在Form1类中定义了一个button1点击事件,触发OpenJpg()函数,该函数设置对话框初始目录为E盘,并过滤只显示JPG文件。

4394

被折叠的 条评论
为什么被折叠?



