句柄厚度:ResizeMode.CanResize和ResizeMode.noResize之间的差异 [英] Handle thickness: difference between ResizeMode.CanResize and ResizeMode.noResize
问题描述
在我的应用程序中,我有一个主窗口,我需要靠近另一个窗口.
如果我们将MainWin和2ndWin称为两个窗口,则只需使用方法 SetCloseToWindow
如果我使用带有ResizeMode.CanResize的窗口似乎一切正常,但是如果尝试使用ResizeMode.NoResize
平铺窗口,则该窗口向左移动5像素, 2 piexel up.
考虑到窗口通常在top = 0的情况下位于屏幕顶部上方,第二个apper 2 piexel.
如果我将相同的REsizemode设置为窗口的行为是相同的.
现在是问题.
我如何为这两种类型的od窗口获得相同的放置位置?有一些属性可以指定此跨度吗?
我使用原始解决方案插入跨度来避免这种情况
In my application i have a main window and i need to put close to this one other windows.
If we call MainWin and 2ndWin the two window i simply use the method SetCloseToWindow
If I use a window with ResizeMode.CanResize all seems ok, but if try to tile a window with ResizeMode.NoResize
the window appear moved of 5 pixel on the left and 2 piexel up.
Consider that the windows are normally with top=0 the 2nd one apper 2 piexel over the top of the screen.
If I set the same REsizemode for the window the behaviour is the same.
Now the question.
How i can obtain the same placing for these two type od windows? there are some properties that specify this span?
I used a raw solution inserting a span to avoid this
int
span = windowOwned.ResizeMode == ResizeMode.NoResize ? 5 : 0;
推荐答案
ttattaggp,
NoResize .用户无法调整窗口大小.没有显示最大化"和最小化"框.
Hi bottaxxgp,
NoResize . The user cannot resize the window. The Maximize and Minimize boxes are not shown.
CanResize .用户具有使用最小化"和最大化"框以及在窗口周围可拖动的轮廓来调整窗口大小的全部能力.显示并启用了最小化"和最大化"框. (默认).
CanResize . The user has the full ability to resize the window, using the Minimize and Maximize boxes, and a draggable outline around the window. The Minimize and Maximize boxes are shown and enabled. (Default).
这篇关于句柄厚度:ResizeMode.CanResize和ResizeMode.noResize之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!