Trainee
Date of registration: Mar 16th 2009
Location: Perth, WA, Australia
Occupation: Software/Test Engineer
Hobbies: be a husband and a dad, play ukulele, sing
Jabaco Source |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
Public Form1 As New Form1 Public Sub main(ByJava args() As String) Dim i As Integer Dim s As String Dim sCaption As String Dim sSound As String Dim sTimeout As String Dim bNoTimeout As Boolean Dim myArgs() As String myArgs = args Form1.SetDefaultClose() Form1.Caption = "Alerter v1" Form1.Visible = True Form1.Label1.TextAlign = fmTextAlignCenter Form1.Label1.FontBold = True Form1.Label1.FontSize = 18 bTimeout = False For i = LBound(myArgs) To UBound(myArgs) s = myargs(i) MsgBox(s) If BeginsWith(s, "/TEXT:") Then sCaption = UnQuote(Mid(s,7)) ElseIf BeginsWith( s, "/SOUND:" ) Then sSound = UnQuote(Mid(s,8)) ElseIf beginswith(s,"/TIMEOUT:") Then sTimeout = UnQuote(Mid(s,10)) ElseIf beginswith(s,"/NOTIMEOUT") Then bNoTimeout = True End If Next Form1.Label1.Caption = sCaption & ", " & sSound & ", " & sTimeout & ", " & bNoTimeout Form1.bOK.SetFocus Form1.Show() End Sub Function BeginsWith( Byval sText As String, Byval sPart As String, Optional bCaseInsens As Boolean = True) As Boolean If bCaseInsens Then BeginsWith = (LCase(Left(sText,Len(sPart))) = LCase(sPart)) Else BeginsWith = (Left(sText,Len(sPart)) = sPart) End If End Function Function UnQuote( ByVal sText As String) As String UnQuote = sText IF Left(sText,1)= Chr(34) Then UnQuote = Mid(sText, 2) End If If Right(sText,1) = Chr(34) Then UnQuote = Left(sText,Len(sText)-1) End If End Function |
Jabaco Source |
|
1 2 3 |
Public Sub bOK_Click() hide End Sub |
Yes, good suggestion, please note it under "Suggestions" so hopefully it won't be forgottenQuoted
Also It'd be really nice if the next iteration of Jabaco allowed one to set commandline options in the IDE
Quoted
why the app stays in memory after it runs, requiring a process kill
Source code |
|
1 2 3 4 |
Public Sub bOK_Click() Unload Me VBA#Global.End End Sub |
Yes it doesQuoted
why I tell the OK button to get the focus but it doesn't get it
Jabaco Source |
|
1 2 3 |
Public Sub Form_Load() bOK.SetFocus End Sub |
This post has been edited 1 times, last edit by "OlimilO" (Oct 5th 2009, 6:54pm)