### UI App Template

B4J creates a default skeleton app (template) with some vars and sub appstart.
Define default template
To use another template, an option is to define a default template in an external file and
then load via clipboard in B4J IDE.
Example:
Region Project Notes
' This file is part of the B4J Project
'
' This Source Code is subject to the terms of the Mozilla Public License,
' v. 2.0. If a copy of the MPL was Not distributed with this File, You can
' obtain one at http://mozilla.org/MPL/2.0/
'
' @see readme.txt
' @since B4J
' @author @
' @version
End Region
Region Project ToDo
End Region
Region Project Attributes
#MainFormWidth: 600
#MainFormHeight: 400
End Region
`Sub Process_Globals
Private CAPPTITLE As String = ""
Private CAPPVERSION As String = ""
Private CAPPCOPYRIGHT As String = "Copyright (c) YYYY, @ "
Private CAPPLOG As Boolean = False
Private fx As JFX
Private MainForm As Form
End Sub`
Region Application
`Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Main")
MainForm.Title = CAPPTITLE
MainForm.Show
'
AppInit
End Sub`
' Return true to allow the default exceptions handler to handle the uncaught exception.
`Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub`
' Initialize Steps
`Sub AppInit
' ADD
End Sub`
' Close App Steps
`Sub AppClose
' ADD
MainForm.Close
End Sub`
End Region
Region MainForm
`Sub MainForm_Close
AppClose
End Sub`
' Handle form closing via system close (top right X button)
`Sub MainForm_CloseRequest (EventData As Event)
AppClose
End Sub`
End Region

Changed: , Category: Application Development, File: T6C160M1197.htm, ID: 1197