# 自定义窗口

{% hint style="success" %}
此工具已开源发布
{% endhint %}

{% embed url="<https://github.com/FastChen/CustomWindow>" %}

{% code title="CustomWindow\.sln" %}

```csharp
Software software = new Software();
software.Name = "自定义窗口";
software.ProjectID = "CustomWindow";
software.Release = "https://nullcraft.org/d/100";
software.ReleaseDate = DateTime.Parse("2024,12,09").ToString();
software.Language = new string[] { "简体中文" };
software.Program = "C#";
software.Framework = ".NET8";

NullCraftSoftwareList.add(software);

Trace.WriteLine(NullCraftSoftwareList.Items.Conut());

>>> 23
```

{% endcode %}

## 关于《自定义窗口》 <a href="#guan-yu-mo-zu-jia-zai-qi-zhong-xin" id="guan-yu-mo-zu-jia-zai-qi-zhong-xin"></a>

### 下载《自定义窗口》 <a href="#xia-zai-mo-zu-jia-zai-qi-zhong-xin" id="xia-zai-mo-zu-jia-zai-qi-zhong-xin"></a>

{% embed url="<https://nullcraft.org/d/100>" %}

### 软件介绍 <a href="#jie-shao-yu-shi-yong" id="jie-shao-yu-shi-yong"></a>

通过调用 Windows API(Win32API) `MoveWindow`、`SetWindowPos` 实现对窗口句柄发送更新窗口位置、尺寸从而更改窗口的状态。

**了解更多API:**

* 全部 [Windows API 索引](https://learn.microsoft.com/zh-cn/windows/win32/apiindex/windows-api-list)
* 了解 [MoveWindow](https://learn.microsoft.com/zh-cn/windows/win32/api/winuser/nf-winuser-movewindow)
* 了解 [SetWindowPos](https://learn.microsoft.com/zh-cn/windows/win32/api/winuser/nf-winuser-setwindowpos)

### 使用教学 <a href="#jie-shao-yu-shi-yong" id="jie-shao-yu-shi-yong"></a>

{% hint style="warning" %}
使用本工具需要先安装 [.NET8](https://dotnet.microsoft.com/zh-cn/download/dotnet/8.0) 桌面运行环境。
{% endhint %}

**视频教学：** [点此前往查看视频](https://www.bilibili.com/video/BV1tTqcYmEMp/)

**文字教学：**

1. 运行工具
2. 选择程序路径或程序的进程名称
3. 设置一个尺寸
4. 点击 修改窗口按钮 测试是否修改成功

### 更新日志 <a href="#geng-xin-ri-zhi" id="geng-xin-ri-zhi"></a>

{% content-ref url="customwindow/update" %}
[update](https://docs.nullcraft.org/software/customwindow/update)
{% endcontent-ref %}

### 软件图片

<figure><img src="https://3120800205-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBw0VwoV0yDZshBzmKvNc%2Fuploads%2FzHnxDcGJfywXpdl9PCUm%2Fmain.png?alt=media&#x26;token=64a8f9b4-bb6d-42bb-988a-53d91bfce05f" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nullcraft.org/software/customwindow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
