小编The*_*fus的帖子

在C#中设置按钮的背景图片

我想将图像设置为 Windows 窗体按钮的背景。

\n\n

该图像将添加到project\xc2\xb4s 资源中。

\n\n

我该怎么做呢?

\n

c# background image button

2
推荐指数
1
解决办法
3万
查看次数

更改.zip的位置c#

这是我的代码:

    namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string appdata = System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData);
            string subFolderPath = System.IO.Path.Combine(appdata, ".minecraft");
            string bin = System.IO.Path.Combine(subFolderPath, "bin");
            string mods = System.IO.Path.Combine(subFolderPath, "mods");
            string coremods =System.IO.Path.Combine(subFolderPath, "coremods");
            string config = System.IO.Path.Combine(subFolderPath, "config");
            if (Directory.Exists(mods)) Directory.Delete(mods,true);
            if (Directory.Exists(config)) Directory.Delete(config, true);
            if (Directory.Exists(coremods)) Directory.Delete(coremods, true);




            FastZip fZip1 = new FastZip();
            fZip1.ExtractZip(@"C:\Users\Rafa\Desktop\MagicFarm.zip", subFolderPath, "config");


            FastZip fZip = new FastZip();
            fZip.ExtractZip(@"C:\Users\Rafa\Desktop\MagicFarm.zip", subFolderPath, "mods");

            FastZip fZip2 = new FastZip();
            fZip2.ExtractZip(@"C:\Users\Rafa\Desktop\MagicFarm.zip", subFolderPath, "coremods");
Run Code Online (Sandbox Code Playgroud)

我想把"C:\ Users\Rafa\Desktop\MagicFarm.zip"放在项目目录中.

有人能帮我吗?

c#

0
推荐指数
1
解决办法
124
查看次数

标签 统计

c# ×2

background ×1

button ×1

image ×1