Article ID: 180527
Article Last Modified on 3/11/2005
Option Explicit
Dim FormHeight
Dim FormWidth
Private Sub Form_Load()
'initialize form size, could be set at design-time also.
Form1.height = 2000
Form1.width = 3000
'Save the form's height and width.
FormHeight = Form1.Height
FormWidth = Form1.Width
Command1.Caption = "Maximized"
Command2.Caption = "Normal"
End Sub
Private Sub Command1_Click()
Form1.WindowState = 2 'Maximized
End Sub
Private Sub Command2_Click()
'Restore the form's original height and width.
Form1.Height = FormHeight
Form1.Width = FormWidth
End Sub
Private Sub Form_Load()
Command1.Caption = "Maximized"
Command2.Caption = "Normal"
'initialize form size, could be set at design-time also.
Form1.height = 2000
Form1.width = 3000
End Sub
Private Sub Command1_Click()
Form1.WindowState = 2 'Maximized
End Sub
Private Sub Command2_Click()
Form1.WindowState = 0 'Normal
End Sub
Additional query words: wince vbce vbce6 evb
Keywords: kbbug kbtoolkit kbpending KB180527