http://expert.csdn.net/Expert/topic/1358/1358534.xml?temp=.8612329
如何限制可变大小窗口的缩小?通过resize处理如下:
Private Sub Form_Resize()
If Me.Width < 1000 Then
Me.Width = 1000
End If
End Sub
这样窗口无法最小化,怎么办呢?
...全文
786打赏收藏
“已解决”的问题依然有错,出现这种情况怎么办?
http://expert.csdn.net/Expert/topic/1358/1358534.xml?temp=.8612329 如何限制可变大小窗口的缩小?通过resize处理如下: Private Sub Form_Resize() If Me.Width < 1000 Then Me.Width = 1000 End If End Sub 这样窗口无法最小化,怎么办呢?
WM_GETMINMAXINFO
The WM_GETMINMAXINFO message is sent to a window when the size or position of the window is about to change. An application can use this message to override the window's default maximized size and position, or its default minimum or maximum tracking size.
WM_GETMINMAXINFO
lpmmi = (LPMINMAXINFO) lParam; // address of structure
Parameters
lpmmi
Value of lParam. Pointer to a MINMAXINFO structure that contains the default maximized position and dimensions, and the default minimum and maximum tracking sizes. An application can override the defaults by setting the members of this structure.
Return Values
If an application processes this message, it should return zero.
Remarks
The maximum tracking size is the largest window size that can be produced by using the borders to size the window. The minimum tracking size is the smallest window size that can be produced by using the borders to size the window.
QuickInfo
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in winuser.h.
MINMAXINFO
The MINMAXINFO structure contains information about a window's maximized size and position and its minimum and maximum tracking size.
typedef struct tagMINMAXINFO { // mmi
POINT ptReserved;
POINT ptMaxSize;
POINT ptMaxPosition;
POINT ptMinTrackSize;
POINT ptMaxTrackSize;
} MINMAXINFO;
Members
ptReserved
Reserved; do not use.
ptMaxSize
Specifies the maximized width (point.x) and the maximized height (point.y) of the window.
ptMaxPosition
Specifies the position of the left side of the maximized window (point.x) and the position of the top of the maximized window (point.y).
ptMinTrackSize
Specifies the minimum tracking width (point.x) and the minimum tracking height (point.y) of the window.
ptMaxTrackSize
Specifies the maximum tracking width (point.x) and the maximum tracking height (point.y) of the window.
QuickInfo
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in winuser.h.