问题标签 [minimize]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
4 回答
9238 浏览

delphi - 使用 Delphi 最小化外部应用程序

有没有办法在我的 Delphi 应用程序中最小化我无法控制的外部应用程序?

例如notepad.exe,除了我要最小化的应用程序将只有一个实例。

0 投票
3 回答
291 浏览

javascript - Javascript 命令仅在未最小化时执行

当我使用未最小化的 JavaScript 文件时,我想登录到控制台。

当我最小化 JavaScript 时,评论已经被删除。我想知道是否有一种方法可以编写一个未注释掉但在我最小化 JavaScript 文件时仍会被删除的命令。

0 投票
8 回答
15242 浏览

c# - 如何在 C# 中禁用最小化按钮?

在我的应用程序中,我需要暂时灰显主窗体的最小化按钮。有什么想法可以实现吗?我不介意对 Win32 dll 执行 p/invokes。

编辑:将最小化按钮变灰是首选解决方案,但是还有其他方法可以防止表单最小化吗?

0 投票
2 回答
3969 浏览

.net - Pocket PC/Windows Mobile:如何检测智能最小化

如何检测我的 Compact Framework 应用程序何时被智能最小化(智能最小化是用户单击 Pocket PC 右上角的“X”按钮时发生的事情)?

Deactivate 事件不是正确的方法,因为它发生在最小化以外的情况下,例如当消息框或其他窗体显示在主窗体顶部时。并且表单的 WindowState 没有帮助,因为 .NET CF 上没有“最小化”WindowState。

我听说通过设置 MinimizeBox = false,我的应用程序将被关闭而不是最小化。但我实际上不希望我的应用程序关闭,我只想知道它什么时候被最小化。

0 投票
2 回答
3359 浏览

algorithm - 寻求一种算法来有效地布局日历事件横幅

我正在寻找一种算法来有效地放置全天/多天事件横幅,就像 Outlook 或 Google 日历中的月视图一样。我有许多具有开始和结束日期的事件,按增加开始(然后结束)日期(或您喜欢的任何其他顺序,我正在从数据库表中收集事件)排序。我想尽量减少平均垂直空间的使用量,因为在事件横幅之后,我需要为当天放置其他事件(这些总是在给定日期的横幅之后)。因此,例如,如果我有两个事件,一个 1/10-1/11 和一个 1/11-1/15,我更愿意像这样安排它们(每一列是一天):

不喜欢:

因为当我只添加当天的事件(x、y 和 z)时,我可以这样做(我更喜欢第一个,不想要第二个):

但这并不像将较长的事件放在首位那么简单,因为对于 1/10-1/11、1/13-1/14 和 1/11-1/13,我想要:

相对于:

因为这将允许事件 x 和 y:

当然,我更愿意一次性完成。对于数据结构,我目前正在使用从日期到列表的映射,其中对于事件的每一天,我将事件添加到相应的列表中。因此,一个为期三天的事件出现在三个列表中,每个列表都位于地图中的某一天之下。这是将结果转换为可视输出的便捷结构,但我也对其他数据结构持开放态度。我目前正在使用贪婪算法,我只是按顺序添加每个事件,但这会产生不需要的伪影,例如:

对于大多数“e”事件日,这会浪费大量空间。

有任何想法吗?

0 投票
1 回答
799 浏览

winapi - Vista live thumbnail issue with SetWindowRgn

I know I am probably missing something, but I can't seem to get windows to show the live thumbnail preview correctly when using a window that has a region. When hitting the minimize button the preview will clip to the minimized size (160x25) rather than showing the full preview (like it does with other windows).

Few points to make:

1) The preview works fine in Windows Live Messenger, so Microsoft figured out a way to do it.

2) If I call SetWindowRgn only before a window is visible, it works fine (so its not a fault of the DWM not knowing how to deal with regioned windows.) I can call SetWindowRgn many times before the window is visible and it works great.

3) I need to set the window region after I show the window in case of a resize. So a fix to just set it before will not work.

4) Even when using the default window procedure, the bug still happens. So it is not a fault of processing a message incorrectly (but could be a fault of 'not processing' one :) )

5) When minimizing by clicking the taskbar button (instead of the minimize button in the window), the preview normally works fine (even after setting the region when visible). Again proving that it does not how to deal with the preview.

The bug happens if I set a region after I have shown the window. Code to follow:

0 投票
17 回答
23844 浏览

javascript - 你用什么来最小化和压缩 JavaScript 库?

你用什么来最小化和压缩 JavaScript 库?

0 投票
2 回答
3394 浏览

graphics - 最小化多边形顶点

什么是减少多边形顶点数量而不改变多边形外观的好算法?

输入:一个多边形,表示为一个点列表,具有太多顶点:例如,来自鼠标的原始输入。

输出:一个顶点少得多的多边形,看起来仍然很像原始多边​​形:例如,可用于碰撞检测的多边形(不一定是凸的)。

编辑:对此的解决方案类似于在图表上找到最佳拟合的多段线。在我的算法书中,它被称为分段最小二乘法。

Edit2:Douglas Peucker 算法是我真正想要的。

0 投票
3 回答
62780 浏览

java - 如何将 Java 应用程序放入系统托盘?

我有一个小控制面板,只是我制作的一个小应用程序。我想用系统最小化/向上/向下放置控制面板,以及电池寿命、日期、网络等。

任何人都可以给我一个线索,链接到教程或阅读的东西吗?

0 投票
7 回答
17999 浏览

python - PyQt4 最小化到托盘

有没有办法在 PyQt4 中最小化托盘?我已经使用过 QSystemTrayIcon 类,但现在我想最小化或“隐藏”我的应用程序窗口,并且只显示托盘图标。

有人做过吗?任何方向将不胜感激。

在 Window XP Pro 上使用 Python 2.5.4 和 PyQt4