using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace GetDeskDirectory
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string dir = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
MessageBox.Show("桌面的路径是"+dir);
}
}
}
时间: 2024-10-07 20:27:03