# Re: 请问如何用vb写个.........

Posted by ching on May 23, 1999 at 16:17:41:

In Reply to: 请问如何用vb写个......... posted by chen on May 23, 1999 at 07:14:54:

: 请问如何用vb写个表单随解析大小自动变换表单size?
试看看，自己再变化一下，
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long

GetWindowRect GetDesktopWindow(), DesktopArea
'Position form
Form1.Height = 4300
Form1.Width = 6300
If DesktopArea.Right = 640 And DesktopArea.Bottom = 480 Then
Form1.Left = -505
Form1.Top = 404
ElseIf DesktopArea.Right = 800 And DesktopArea.Bottom = 600 Then
Form1.Left = 645
Form1.Top = 1350
ElseIf DesktopArea.Right = 1024 And DesktopArea.Bottom = 768 Then
Form1.Left = 2354
Form1.Top = 2670

Follow Ups: