GUI/Maximum window dimensions: Difference between revisions

m
whitespace
m (whitespace)
Line 23:
From with the project create a form (FMain) with the following properties set:
 
<lang gambas>FMain.Maximized = True
FMain.Visible = False ' The form can be invisible</lang>
FMain.Maximized = True
FMain.Visible = False ' The form can be invisible
</lang>
 
From within the projectview, rightclick the FMain form and select Edit class from the contextmenu. This will display a form class file (FMain.class) as follows:
 
<lang gambas>PUBLIC SUB _new()
PUBLIC SUB _new()
 
END
Line 37 ⟶ 34:
PUBLIC SUB Form_Open()
 
END</lang>
</lang>
 
=== Adding the form resize event ===
Line 44 ⟶ 40:
We can now add a Form_Resize() event to the class file with the necessary code to obtain the screen dimensions as follows:
 
<lang gambas>PUBLIC SUB Form_Resize()
PUBLIC SUB Form_Resize()
PRINT "The maximum window size that can be used without scrolling is "; FMain.Width; " x "; FMain.Height
END</lang>
 
</lang>
 
== {{header|Visual Basic}} ==
Anonymous user