Log an Entry using global Boolean |
AppLogID: 7 - Description: Log an Entry using global Boolean - Dependencies: - Tags: Logging - Modified: 05.05.2014 09:21 ' Global var ' Set flag to false to turn logging off Public CAPPLOG As Boolean = True
' Log an entry Sub AppLog (sEntry As String) If CAPPLOG Then Log(DateTime.Date(DateTime.Now) & " " & DateTime.Time(DateTime.Now) & ":" & sEntry) End If End Sub
|
Set a formstyle "Toolbox" like (Utility Form) |
Formstyle ToolboxID: 8 - Description: Set a formstyle "Toolbox" like (Utility Form) - Dependencies: - Tags: - Modified: 05.05.2014 12:43 MainForm.Resizable = False ' Toolbox like window MainForm.SetFormStyle("UTILITY") ' Must be set prior show
|
Additional Project Regions Copyright, Notes, Attributes |
Project RegionsID: 9 - Description: Additional Project Regions Copyright, Notes, Attributes - Dependencies: - Tags: - Modified: 06.05.2014 10:55 #Region Copyright ' This file is part of the B4J Project PROJECTNAME ' ' 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/ ' ' Copyright (C) 2014, Robert W.B. Linn, Pinneberg, Germany (www.rwblinn.de). ' Internet: www.rwblinn.de, E-Mail: robert@rwblinn.de ' Read readme.txt for any latest information ' #End Region
#Region Project Notes ' B4J Project Description ' Dependencies: jSQL ' App Principle: ' #End Region
#Region Project ToDo 'TODO: Description #End Region
|
Get the current date and time as string |
getDateTimeID: 5 - Description: Get the current date and time as string - Dependencies: - Tags: Date, Time - Modified: 04.05.2014 17:41:26 ' Get the current date and time as string Sub getDateTime As String Dim now As Long now = DateTime.now Return DateTime.Date(now) & " " & DateTime.Time(now) End Sub
|
Get the Easter date in format yyyy-MM-dd |
getEasterDateID: 6 - Description: Get the Easter date in format yyyy-MM-dd - Dependencies: - Tags: Date Time - Modified: 04.05.2014 18:00:34 ' Get the Easter date in format yyyy-MM-dd ' Return String in format yyy-MM-dd, like 2014-04-20 Sub getEasterDate(Year As Int) As String Dim a As Int Dim b As Int Dim c As Int Dim d As Int Dim e As Int Dim f As Int Dim g As Int Dim h As Int Dim i As Int Dim k As Int Dim l As Int Dim m As Int Dim n As Int Dim p As Int
If Year < 1583 Then Return a = Year Mod 19 b = Year / 100 c = Year Mod 100 d = b / 4 e = b Mod 4 f = (b + 8) / 25 g = (b - f + 1) / 3 h = (19 * a + b - d - g + 15) Mod 30 i = c / 4 k = c Mod 4 l = (32 + 2 * e + 2 * i - h - k) Mod 7 m = (a + 11 * h + 22 * l) / 451 n = (h + l - 7 * m + 114) / 31 p = (h + l - 7 * m + 114) Mod 31 Return Year & "-" & NumberFormat(n, 2 ,0) & "-" & NumberFormat((p + 1), 2 ,0) End Sub
|