[LEFT][FONT=Courier New][COLOR=#008000]'First add an object named flb of type FormLib.[/COLOR][/FONT]
[FONT=Courier New][COLOR=#0000ff]Sub [/COLOR][/FONT][FONT=Courier New][COLOR=#010101]Globals[/COLOR][/FONT][/LEFT]
[LEFT][FONT=Courier New][COLOR=#0000ff]End Sub[/COLOR][/FONT][/LEFT]
[LEFT][FONT=Courier New][COLOR=#0000ff]Sub [/COLOR][/FONT][FONT=Courier New][COLOR=#010101]App_Start[/COLOR][/FONT]
[FONT=Courier New][COLOR=#010101] Form1.show[/COLOR][/FONT]
[FONT=Courier New][COLOR=#010101] flb.New1("Form1",[/COLOR][/FONT][FONT=Courier New][COLOR=#0000ff]B4PObject[/COLOR][/FONT][FONT=Courier New][COLOR=#010101](1))[/COLOR][/FONT]
[FONT=Courier New][COLOR=#0000ff]End Sub[/COLOR][/FONT][/LEFT]
[LEFT][FONT=Courier New][COLOR=#0000ff]Sub [/COLOR][/FONT][FONT=Courier New][COLOR=#010101]flb_Resize [/COLOR][/FONT][FONT=Courier New][COLOR=#008000]'Fires when the user changes the screen orientation[/COLOR][/FONT]
[FONT=Courier New][COLOR=#0000ff]if [/COLOR][/FONT][FONT=Courier New][COLOR=#010101]Form1.Width > Form1.Height [/COLOR][/FONT][FONT=Courier New][COLOR=#0000ff]then[/COLOR][/FONT]
[FONT=Courier New][COLOR=#0000ff]msgbox[/COLOR][/FONT][FONT=Courier New][COLOR=#010101]("Landscape")[/COLOR][/FONT]
[FONT=Courier New][COLOR=#0000ff]else[/COLOR][/FONT]
[FONT=Courier New][COLOR=#0000ff]msgbox[/COLOR][/FONT][FONT=Courier New][COLOR=#010101]("Portrait")[/COLOR][/FONT]
[FONT=Courier New][COLOR=#0000ff]end if[/COLOR][/FONT]
[FONT=Courier New][COLOR=#0000ff]End Sub[/COLOR][/FONT][/LEFT]