<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <author>
    <name>春煦景明</name>
  </author>
  <generator uri="https://hexo.io/">Hexo</generator>
  <icon>https://lunanorth.github.io/images/moon.png</icon>
  <id>https://lunanorth.github.io/</id>
  <link href="https://lunanorth.github.io/" rel="alternate"/>
  <link href="https://lunanorth.github.io/atom.xml" rel="self"/>
  <rights>All rights reserved 2026, 春煦景明</rights>
  <subtitle>记录生活与成长</subtitle>
  <title>春煦景明</title>
  <updated>2026-11-09T13:51:50.474Z</updated>
  <entry>
    <author>
      <name>春煦景明</name>
    </author>
    <category term="WinForm" scheme="https://lunanorth.github.io/categories/WinForm/"/>
    <category term="问题记录" scheme="https://lunanorth.github.io/tags/%E9%97%AE%E9%A2%98%E8%AE%B0%E5%BD%95/"/>
    <content>
      <![CDATA[<h3 id="问题描述"><a href="#问题描述" class="headerlink" title="问题描述"></a><span data-type="text" style="color: var(--b3-font-color8);">问题描述</span></h3><p>建议：如果是刚开始写WinForm项目 ，建议刚开始就去进行一个替换 ，要不然后面会很麻烦的 ，不仅要计算size 还要去 计算 location 的值</p><p>昨天碰到了这个问题 ，当时设置完之后界面就非常的模糊 ，虽然说界面变大了 ，但是看着异常难受 ，很模糊</p><h3 id="解决方案"><a href="#解决方案" class="headerlink" title="解决方案"></a><span data-type="text" style="color: var(--b3-font-color8);">解决方案</span></h3><ol><li><p>新建​<code>应用程序清单文件（Application Manifest File）</code>​ ， 保持默认名称 ​<code>app.manifest</code>，点击添加。</p></li><li><p>找到这段代码：</p><p><img src="https://img2024.cnblogs.com/blog/3509019/202510/3509019-20251004072422062-1722481762.png" alt="image"></p><figure class="highlight xml"><table><tr><td class="code"><pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">application</span> <span class="hljs-attr">xmlns</span>=<span class="hljs-string">&quot;urn:schemas-microsoft-com:asm.v3&quot;</span>&gt;</span><br>  <span class="hljs-tag">&lt;<span class="hljs-name">windowsSettings</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">dpiAware</span> <span class="hljs-attr">xmlns</span>=<span class="hljs-string">&quot;http://schemas.microsoft.com/SMI/2005/WindowsSettings&quot;</span>&gt;</span>true<span class="hljs-tag">&lt;/<span class="hljs-name">dpiAware</span>&gt;</span><br>  <span class="hljs-tag">&lt;/<span class="hljs-name">windowsSettings</span>&gt;</span><br><span class="hljs-tag">&lt;/<span class="hljs-name">application</span>&gt;</span><br></code></pre></td></tr></table></figure></li><li><p>替换DPI相关配置：</p><figure class="highlight xml"><table><tr><td class="code"><pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">application</span> <span class="hljs-attr">xmlns</span>=<span class="hljs-string">&quot;urn:schemas-microsoft-com:asm.v3&quot;</span>&gt;</span><br>  <span class="hljs-tag">&lt;<span class="hljs-name">windowsSettings</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">dpiAware</span> <span class="hljs-attr">xmlns</span>=<span class="hljs-string">&quot;http://schemas.microsoft.com/SMI/2005/WindowsSettings&quot;</span>&gt;</span>true/pm<span class="hljs-tag">&lt;/<span class="hljs-name">dpiAware</span>&gt;</span><br>    <span class="hljs-comment">&lt;!-- Windows 10 1703+ 支持 Per-Monitor v2 --&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">dpiAwareness</span> <span class="hljs-attr">xmlns</span>=<span class="hljs-string">&quot;http://schemas.microsoft.com/SMI/2016/WindowsSettings&quot;</span>&gt;</span>permonitorv2,permonitor<span class="hljs-tag">&lt;/<span class="hljs-name">dpiAwareness</span>&gt;</span><br>     <span class="hljs-comment">&lt;!-- 保留长路径支持（如果需要） --&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">longPathAware</span> <span class="hljs-attr">xmlns</span>=<span class="hljs-string">&quot;http://schemas.microsoft.com/SMI/2016/WindowsSettings&quot;</span>&gt;</span>true<span class="hljs-tag">&lt;/<span class="hljs-name">longPathAware</span>&gt;</span><br>  <span class="hljs-tag">&lt;/<span class="hljs-name">windowsSettings</span>&gt;</span><br><span class="hljs-tag">&lt;/<span class="hljs-name">application</span>&gt;</span><br></code></pre></td></tr></table></figure></li><li><p>保存文件，重新生成项目即可生效。</p></li></ol><h3 id="替换方案-尺寸不一致解决方案"><a href="#替换方案-尺寸不一致解决方案" class="headerlink" title="替换方案(尺寸不一致解决方案)"></a><span data-type="text" style="color: var(--b3-font-color8);">替换方案(尺寸不一致解决方案)</span></h3><p>因为你刚替换完 ，尺寸与原来的是不一致的 ，所以就需要进一步的替换原先的尺寸</p><hr><p>在 DPI 感知的应用程序中，当系统缩放比例从 100% 变为 150% 时，界面元素的实际像素尺寸计算遵循   <strong>“逻辑尺寸 × 缩放比例 &#x3D; 实际像素尺寸”</strong>   的规则。以下是具体说明：</p><p>假设在 100% 缩放时，某按钮的逻辑尺寸为宽度 100 像素、高度 30 像：</p><ul><li>100% 缩放（系数 1.0）：实际像素尺寸 = 100 × 1.0 = 100 像素（宽），30 × 1.0 = 30 像素（高）。</li><li>150% 缩放（系数 1.5）：实际像素尺寸 = 100 × 1.5 = 150 像素（宽），30 × 1.5 = 45 像素（高）。</li></ul><p><span data-type="text" style="color: var(--b3-font-color3);">举例说明：尺寸计算表（基准：89 × 31）</span></p><table><thead><tr><th>缩放比例</th><th>缩放系数</th><th>实际宽度（像素）</th><th>实际高度（像素）</th><th>计算逻辑</th></tr></thead><tbody><tr><td>100%</td><td>1.0</td><td>89</td><td>31</td><td>89 × 1.0 = 89；31 × 1.0 = 31</td></tr><tr><td>150%</td><td>1.5</td><td>133.5</td><td>46.5</td><td>89 × 1.5 = 133.5；31 × 1.5 = 46.5</td></tr></tbody></table><hr><p>在 WinForms 应用中开启 DPI 感知后，系统缩放比例从 100% 变为 150% 时，​<code>Location</code>​（控件位置，即 X、Y 坐标）的计算核心遵循   <strong>“基准逻辑坐标 × 缩放系数（150%</strong>     <strong>&#x3D;</strong>   <strong>1.5）&#x3D;</strong>   <strong>实际像素坐标”</strong>   规则，同时需结合 WinForms 的 DPI 适配机制（尤其是 .NET Framework 4.6+ 或 .NET Core 3.0+ 的高 DPI 支持），具体细节如下：</p><p>一、核心计算逻辑（手动计算场景）</p><p>若需手动计算 ​<code>Location</code>，需明确两个前提：</p><ol><li><strong>基准坐标</strong>​：100% 缩放时，控件在代码中定义的 ​<code>Location</code>​（如 ​<code>new Point(20, 30)</code>​，即 X=20，Y=30），这是 “逻辑坐标”，对应 100% 缩放时的实际像素。</li><li><strong>缩放系数</strong>​：系统缩放比例对应的系数（100% = 1.0，150% = 1.5）。</li></ol><p>计算公式：：实际像素坐标（150% 缩放）&#x3D; 基准逻辑坐标 × 1.5</p><p>示例：</p><p>假设 100% 缩放时控件基准 ​<code>Location</code>​ 为 ​<code>(14, 6)</code>​（X=14，Y=6）：</p><ul><li>100% 缩放（系数 1.0）：实际坐标 = ​<code>(14×1.0, 6×1.0)</code>​ = ​<code>(14, 6)</code>（像素）。</li><li>150% 缩放（系数 1.5）：实际坐标 = ​<code>(14×1.5, 6×1.5)</code>​ = ​<code>(21, 9)</code>（像素）。</li></ul><hr><h3 id="写到最后"><a href="#写到最后" class="headerlink" title="写到最后"></a>写到最后</h3><p>当然还有像这种自动适配的 ，不需要手动计算 ，就比如DPI自动缩放功能 ，但是我目前还不会这个 ，想着项目刚开始 ，就先以最简单的开始做起 ，也避免了代码中诸多的麻烦所在</p><p>‍</p>]]>
    </content>
    <id>https://lunanorth.github.io/posts/dcdb.html</id>
    <link href="https://lunanorth.github.io/posts/dcdb.html"/>
    <published>2026-11-09T13:51:50.000Z</published>
    <summary>
      <![CDATA[<h3 id="问题描述"><a href="#问题描述" class="headerlink" title="问题描述"></a><span data-type="text" style="color:]]>
    </summary>
    <title>使用100%缩放比例重新启动Visual Studio 界面模糊的解决方案</title>
    <updated>2026-11-09T13:51:50.474Z</updated>
  </entry>
  <entry>
    <author>
      <name>春煦景明</name>
    </author>
    <category term="闲聊杂谈" scheme="https://lunanorth.github.io/categories/%E9%97%B2%E8%81%8A%E6%9D%82%E8%B0%88/"/>
    <category term="碎碎念" scheme="https://lunanorth.github.io/tags/%E7%A2%8E%E7%A2%8E%E5%BF%B5/"/>
    <content>
      <![CDATA[<p>这个还没有想好需要什么 ，先占个位置</p><p>等这周有时间再写吧</p>]]>
    </content>
    <id>https://lunanorth.github.io/posts/1ec6.html</id>
    <link href="https://lunanorth.github.io/posts/1ec6.html"/>
    <published>2026-11-09T13:40:09.000Z</published>
    <summary>
      <![CDATA[<p>这个还没有想好需要什么]]>
    </summary>
    <title>忆往昔</title>
    <updated>2026-11-09T13:46:21.837Z</updated>
  </entry>
  <entry>
    <author>
      <name>春煦景明</name>
    </author>
    <category term="Hexo" scheme="https://lunanorth.github.io/categories/Hexo/"/>
    <category term="记录" scheme="https://lunanorth.github.io/tags/%E8%AE%B0%E5%BD%95/"/>
    <content>
      <![CDATA[<div class="timeline orange"><div class='timeline-item headline'>        <div class='timeline-item-title'>          <div class='item-circle'><p>Lumina日志</p></div>        </div>      </div><div class='timeline-item'>        <div class='timeline-item-title'>          <div class='item-circle'><p>2026-11-09 20:30</p></div>        </div>        <div class='timeline-item-content'><p>更新博客相关细节部分</p></div>      </div></div>]]>
    </content>
    <id>https://lunanorth.github.io/posts/286c.html</id>
    <link href="https://lunanorth.github.io/posts/286c.html"/>
    <published>2026-11-09T12:29:12.000Z</published>
    <summary>记录Lumina博客更新日志</summary>
    <title>Lumina日志</title>
    <updated>2026-11-09T12:31:24.407Z</updated>
  </entry>
  <entry>
    <author>
      <name>春煦景明</name>
    </author>
    <category term="博客搭建" scheme="https://lunanorth.github.io/categories/%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/"/>
    <category term="Hexo" scheme="https://lunanorth.github.io/tags/Hexo/"/>
    <category term="Butterfly" scheme="https://lunanorth.github.io/tags/Butterfly/"/>
    <content>
      <![CDATA[<p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p><p><img src="https://img2024.cnblogs.com/blog/3509019/202608/3509019-20260821090407869-850550684.png" alt="Hello World"></p><h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="code"><pre><code class="hljs bash">$ hexo new <span class="hljs-string">&quot;My New Post&quot;</span><br></code></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p><h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><code class="hljs bash">$ hexo server<br></code></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p><h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><code class="hljs bash">$ hexo generate<br></code></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p><h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><code class="hljs bash">$ hexo deploy<br></code></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p><h2 id="测试"><a href="#测试" class="headerlink" title="测试"></a>测试</h2><figure class="highlight css"><table><tr><td class="code"><pre><code class="hljs css"><span class="hljs-selector-pseudo">:root</span> &#123;<br>  <span class="hljs-attr">--btf-radius</span>: <span class="hljs-number">12px</span>;<br>  <span class="hljs-attr">--btf-radius-sm</span>: <span class="hljs-number">8px</span>;<br>  <span class="hljs-attr">--btf-radius-pill</span>: <span class="hljs-number">99px</span>;<br>  <span class="hljs-attr">--btf-border-width</span>: <span class="hljs-number">1px</span>;<br>  <span class="hljs-attr">--btf-transition</span>: .<span class="hljs-number">3s</span> ease;<br>  <span class="hljs-attr">--btf-main-width</span>: <span class="hljs-number">1030px</span>;<br>  <span class="hljs-comment">/* Sidebar width: the single source of truth.</span><br><span class="hljs-comment">     Change this one value and the sidebar column, every card inside it</span><br><span class="hljs-comment">     and the total layout width all follow automatically. */</span><br>  <span class="hljs-attr">--btf-aside-width</span>: <span class="hljs-number">315px</span>;<br>  <span class="hljs-comment">/* Structural constant: inner gap between sidebar and main column.</span><br><span class="hljs-comment">     Normally you do NOT need to touch this. */</span><br>  <span class="hljs-attr">--btf-aside-gap</span>: <span class="hljs-number">10px</span>;<br>  <span class="hljs-comment">/* Vertical gap between sidebar cards. */</span><br>  <span class="hljs-attr">--btf-aside-card-gap</span>: <span class="hljs-number">10px</span>;<br>  <span class="hljs-attr">--btf-layout-gutter</span>: <span class="hljs-number">30px</span>;<br>  <span class="hljs-attr">--btf-layout-width</span>: <span class="hljs-built_in">calc</span>(<span class="hljs-built_in">var</span>(--btf-main-width) + <span class="hljs-built_in">var</span>(--btf-aside-width) + <span class="hljs-built_in">var</span>(--btf-layout-gutter));<br>  <span class="hljs-comment">/* Post header cover width (right side of the post top image). */</span><br>  <span class="hljs-attr">--btf-header-cover-width</span>: <span class="hljs-number">300px</span>;<br>&#125;<br></code></pre></td></tr></table></figure><h2 id="MD语法"><a href="#MD语法" class="headerlink" title="MD语法"></a>MD语法</h2><p>记录啦啦啦啦啦</p><ol><li>记录测试</li><li>测试记录飞机飞机</li></ol><div class="timeline orange"><div class='timeline-item headline'>        <div class='timeline-item-title'>          <div class='item-circle'><p>时间轴样式</p></div>        </div>      </div><div class='timeline-item'>        <div class='timeline-item-title'>          <div class='item-circle'><p>2020-07-24 <a href="https://github.com/volantis-x/hexo-theme-volantis/releases">2.6.6 -&gt; 3.0</a></p></div>        </div>        <div class='timeline-item-content'><ol><li>如果有 <code>hexo-lazyload-image</code> 插件，需要删除并重新安装最新版本，设置 <code>lazyload.isSPA: true</code>。</li><li>2.x 版本的 css 和 js 不适用于 3.x 版本，如果使用了 <code>use_cdn: true</code> 则需要删除。</li><li>2.x 版本的 fancybox 标签在 3.x 版本中被重命名为 gallery 。</li><li>2.x 版本的置顶 <code>top: true</code> 改为了 <code>pin: true</code>，并且同样适用于 <code>layout: page</code> 的页面。</li><li>如果使用了 <code>hexo-offline</code> 插件，建议卸载，3.0 版本默认开启了 pjax 服务。</li></ol></div>      </div><div class='timeline-item'>        <div class='timeline-item-title'>          <div class='item-circle'><p>2020-05-15 <a href="https://github.com/volantis-x/hexo-theme-volantis/releases/tag/2.6.6">2.6.3 -&gt; 2.6.6</a></p></div>        </div>        <div class='timeline-item-content'><p>不需要额外处理。</p></div>      </div><div class='timeline-item'>        <div class='timeline-item-title'>          <div class='item-circle'><p>2020-04-20 <a href="https://github.com/volantis-x/hexo-theme-volantis/releases/tag/2.6.3">2.6.2 -&gt; 2.6.3</a></p></div>        </div>        <div class='timeline-item-content'><ol><li>全局搜索 <code>seotitle</code> 并替换为 <code>seo_title</code>。</li><li>group 组件的索引规则有变，使用 group 组件的文章内，<code>group: group_name</code> 对应的组件名必须是 <code>group_name</code>。</li><li>group 组件的列表名优先显示文章的 <code>short_title</code> 其次是 <code>title</code>。</li></ol></div>      </div></div>]]>
    </content>
    <id>https://lunanorth.github.io/posts/3eeb.html</id>
    <link href="https://lunanorth.github.io/posts/3eeb.html"/>
    <published>2026-11-08T23:32:34.573Z</published>
    <summary>Hexo 快速上手：创建文章、本地预览、生成静态文件和部署的完整流程。</summary>
    <title>Hello World</title>
    <updated>2026-11-08T13:53:27.756Z</updated>
  </entry>
  <entry>
    <author>
      <name>春煦景明</name>
    </author>
    <category term="博客搭建" scheme="https://lunanorth.github.io/categories/%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/"/>
    <category term="Markdown" scheme="https://lunanorth.github.io/tags/Markdown/"/>
    <category term="Mermaid" scheme="https://lunanorth.github.io/tags/Mermaid/"/>
    <content>
      <![CDATA[<p>这篇文章演示如何在 Butterfly 主题中用标签外挂书写 Mermaid 图表。</p><div class="mermaid-wrap"><pre class="mermaid-src" data-config="{}" hidden>    flowchart LR    A[开始] --&gt; B{是否理解}    B -- 是 --&gt; C[继续学习]    B -- 否 --&gt; D[查阅文档]    D --&gt; B  </pre></div><p>序列图同样支持：</p><div class="mermaid-wrap"><pre class="mermaid-src" data-config="{}" hidden>    sequenceDiagram    participant U as 读者    participant B as 博客    U-&gt;&gt;B: 打开文章    B--&gt;&gt;U: 渲染 Mermaid 图表  </pre></div>]]>
    </content>
    <id>https://lunanorth.github.io/posts/7a6a.html</id>
    <link href="https://lunanorth.github.io/posts/7a6a.html"/>
    <published>2026-11-07T05:00:00.000Z</published>
    <summary>演示 Butterfly 主题中使用代码块书写 Mermaid 流程图的方式。</summary>
    <title>Mermaid 流程图示例</title>
    <updated>2026-11-08T13:53:27.774Z</updated>
  </entry>
  <entry>
    <author>
      <name>春煦景明</name>
    </author>
    <category term="博客搭建" scheme="https://lunanorth.github.io/categories/%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/"/>
    <category term="MathJax" scheme="https://lunanorth.github.io/tags/MathJax/"/>
    <category term="Markdown" scheme="https://lunanorth.github.io/tags/Markdown/"/>
    <content>
      <![CDATA[<p>这篇文章演示在 Butterfly 主题中书写数学公式的方式。</p><p>行内公式写在 <code>$...$</code> 中，例如质能方程 $E &#x3D; mc^2$。</p><p>独立公式使用 <code>$$...$$</code>：</p><p>$$<br>\int_{-\infty}^{+\infty} e^{-x^2} , dx &#x3D; \sqrt{\pi}<br>$$</p><p>矩阵也可以正常渲染：</p><h1 id="begin-pmatrix-a-b-c-d-end-pmatrix-begin-pmatrix-x-y-end-pmatrix"><a href="#begin-pmatrix-a-b-c-d-end-pmatrix-begin-pmatrix-x-y-end-pmatrix" class="headerlink" title="$$\begin{pmatrix}a &amp; b \c &amp; d\end{pmatrix}\begin{pmatrix}x \y\end{pmatrix}"></a>$$<br>\begin{pmatrix}<br>a &amp; b \<br>c &amp; d<br>\end{pmatrix}<br>\begin{pmatrix}<br>x \<br>y<br>\end{pmatrix}</h1><p>\begin{pmatrix}<br>ax + by \<br>cx + dy<br>\end{pmatrix}<br>$$</p>]]>
    </content>
    <id>https://lunanorth.github.io/posts/2c9c.html</id>
    <link href="https://lunanorth.github.io/posts/2c9c.html"/>
    <published>2026-11-07T04:30:00.000Z</published>
    <summary>演示 Butterfly 主题下 MathJax 的行内公式与独立公式写法。</summary>
    <title>数学公式示例</title>
    <updated>2026-11-08T13:53:27.767Z</updated>
  </entry>
</feed>
