Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
Beginner
Date of registration: Nov 14th 2009
Location: Krugersdorp, South Africa
Occupation: Linux Opensource Consultant
Hobbies: Programming
Intermediate
Date of registration: Jan 1st 2009
Location: Hanover, Germany
Occupation: Software Engineer
Hobbies: Hilbert Curves
Jabaco Source |
|
1 2 3 4 5 6 7 8 |
Public Function description() As String End Function Public Sub reset() End Sub Public Function query() As String End Function |
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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
Implements IUCreset Private initCalls As Integer Private dbField As String Public Sub Init(left As Integer, top As Integer, width As Integer, caption As String, field As String) initCalls = initCalls + 1 If initCalls = 1 Then dbField = field Me.Height = 27 Me.BackColor = myForm1.BackColor Label1.Caption = " " & caption Text1.Text = "" If field <> "" Then Text1.ToolTip = "Textfeld " & caption & " (Datenbankfeld '" & field & "')" Else Text1.ToolTip = "Textfeld " & caption End If myForm1.registerUsercontrol Me ' this adds the Usercontrol to an array for looping purposes End If Me.Left = left Me.Top = top Me.Width = width resize End Sub Public Function query() As String Dim s As String = "" Dim t As String = Trim(Text1.Text) Dim op As String = "=" If t <> "" Then t = Replace(t, "*", "%") t = Replace(t, "?", "_") If (InStr(t, "%") > 0) Or (InStr(t, "_") > 0) Then op = "LIKE" End If s = "( " & dbField & " " & op & " '" & t & "' )" & vbCrLf End If query = s End Function Public Function description() As String Dim s As String = "" Dim t As String = Trim(Text1.Text) If t <> "" Then s = Trim(Label1.Caption) & " = '#MA" & t & "#MB'" End If description = s End Function Private Sub resize() Const xGap = 5 Const yGap = 5 Const h = 17 Label1.Width = (Me.Width - 2 * xGap) / 2 Label1.Left = 0 Text1.Left = Label1.Left + Label1.Width + xGap Text1.Width = Label1.Width - Picture1.Width - 2 * xGap Picture1.Left = Me.Width - Picture1.Width - xGap Label1.Height = h Text1.Height = h Label1.Top = yGap Text1.Top = Label1.Top Picture1.Top = Label1.Top + (h - Picture1.Height)/2 End Sub Public Sub Picture1_Click() reset End Sub Public Sub reset Text1.Text = "" End Sub |
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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
' keep all user controls in a list ' to allow for reset and SQL query calculation Private ucList As java#util#ArrayList Public Sub cmdReset_Click() Dim i As Integer For i = 0 To ucList.size - 1 Cast(ucList.get(i), IUCreset).reset Next i End Sub Public Sub Form_Load() NL = vbCrLf ' abbreviation myForm1 = Me ' cf. mdlGlobal variable ucList = New java#util#ArrayList ' list of user controls End Sub Public Sub Form_Resize() Const xGap = 20 Const yGap = 16 Dim columnWidth As Integer Dim rowHeight As Integer = 27 + yGap Dim minHeight As Integer = yGap + cmdSearch.Height + yGap + 9 * rowHeight + yGap + 5 Dim minWidth As Integer = xGap + cmdSearch.Width + xGap + cmdReset.Width + xGap + cmdEnd.Width + xGap Dim x As Integer Dim y As Integer If Me.Width < minWidth Then Me.Width = minWidth End If If Me.Height < minHeight Then Me.Height = minHeight End If columnWidth = (Me.Width - 4 * xGap) / 3 ' automatic positioning of Usercontrols x = xGap y = yGap ucTrackId.Init x, y, columnWidth, "Track-ID", "cFree10" y = y + rowHeight ucDirection.Init x, y, columnWidth, "Richtung", "cDirection" y = y + rowHeight ucCategory.Init x, y, columnWidth, "Kategorie", "cFree18" y = y + rowHeight ucBusinessUnit.Init x, y, columnWidth, "Business Unit", "cPartner" y = y + rowHeight ucStart.Init x, y, columnWidth, "Startzeit", "cProcessingTimeStart" x = ucUNB.Left + ucUNB.Width + xGap y = yGap ucStatus.Init x, y, columnWidth, "Status", "cStatus" ucStatus.selectText "SUCCESS" y = y + rowHeight ucSource.Init x, y, columnWidth, "Quelle", "cFree2" y = y + rowHeight ucDestination.Init x, y, columnWidth, "Ziel", "cFree3" y = y + rowHeight ucEnd.Init x, y, columnWidth, "Endzeit", "cProcessingTimeEnd" x = ucDestination.Left + ucDestination.Width + xGap y = yGap ucAggregation.Init x, y, columnWidth, "Aggregationsperiode", "",fmMultiSelectSingle cmdSearch.Left = xGap cmdReset.Left = cmdSearch.Left + cmdSearch.Width + xGap cmdEnd.Left = Me.Width - cmdEnd.Width - xGap y = Me.Height - cmdSearch.Height - 1.7 * cmdSearch.Height cmdSearch.Top = y cmdReset.Top = y cmdEnd.Top = y If columnWidth > picLogo.Width Then picLogo.Left = x + columnWidth - picLogo.Width picLogo.Top = y - picLogo.Height - yGap picLogo.Visible = True Else picLogo.Visible = False End If Me.Refresh DoEvents End Sub Public Sub registerUsercontrol(uc As IUCreset) ucList.add uc End Sub |
Beginner
Date of registration: Nov 14th 2009
Location: Krugersdorp, South Africa
Occupation: Linux Opensource Consultant
Hobbies: Programming
Beginner
Date of registration: Nov 14th 2009
Location: Krugersdorp, South Africa
Occupation: Linux Opensource Consultant
Hobbies: Programming
Beginner
Date of registration: Nov 14th 2009
Location: Krugersdorp, South Africa
Occupation: Linux Opensource Consultant
Hobbies: Programming