Search results
Search results 1-20 of 500.
What is this? Does it make sense to open another Wiki on Jabaco? Greetings A1880
Try to leave out the spaces around "=" and write "<div align=center>" rather than "<div align = center>". Greetings A1880
In Java and thus in Jabaco all characters are encoded as Unicode characters internally. I've tried my sample with German characters "äöüÄÖÜß". They are displayed correctly. There might be some Swing properties which influence the character encoding. You might want to Google for "java swing unicode" to get hints. I've found a hint about how to set the default file encoding to Unicode. It seems to be (non Unicode) Cp1252 by default on Windows systems. Greetings A1880
In Java Swing applets you can make use of the fact that JLabel actually supports HTML. To my surprise, the following works: 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 Option Explicit Public Sub Applet_Initialize() Const nl = "<P>" Dim txt As String = _ "<html><body>" _ & "<div align=center>" _ & nl & " " _ & nl & "Now is the time" _ & nl & "for all brave men" _ & nl & "to come to the aid" _ & nl & "of their party!" _ & "</div>" _ & "</body></html>" With ...
Could you put your question in other words or post code + screenshot to illustrate your problem? I don't understand what's wrong. Sorry! Greetings A1880
Jabaco is able to load a VB6 project file right away. This helps to keep all the files together and reduce manual work. But it cannot automatically bridge all conceivable incompatibilities. To migrate an existing VB6 application to Jabaco, you usually have to re-implement it. You can use copy&paste to re-use your code, but it usually takes some extra work to get it to work. Jabaco "Form" objects don't handle DragDrop events. This has to be implemented via Mouse events. The Jabaco Framework does ...
Yes, "Dir()" is not fully VB6 compliant. The following code might inspire you: 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 Option Explicit Import java#io#File Public Sub Command1_Click() Dim s As String Dim childFolders() As File Dim item As File childFolders() = New File("c:\tmp").listFiles() For Each item In childFolders If (item.isDirectory()) Then Debug.Print "Dir " & it...
"Will run on the internet" could mean that you are talking about an "Applet". Applets are executed within your web browser. To develop an applet with a database back-end, you have to develop the applet as a "front-end" which includes all presentation layer activities. The database is the back-end which includes all activities to store data changes persistently and to query data and hand it over to the front-end. Jabaco is a design tool for applets and for stand-alone applications to be run outsi...
Try the following: 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 Option Explicit Public AppPath As String Public Sub Form_Load() AppPath = GetAppPath() MsgBox AppPath End Sub Public Function GetAppPath() As String Dim classPath As String = System.getProperty("java.class.path") Dim pathSeparator As String = System.getProperty("path.separator") Dim fileSeparator As String = System.getProperty("file.separator") Dim cp() As String Dim s As String cp = Split(class...
No, there is no "offical" fix yet. It is still not know, which circumstances lead to the trouble. I've just upgraded to JDK 1.6.0_25-b06. My system is Windows XP SP3. My Jabaco.jar file is 555,162 bytes long. No problems with Jabaco! Greetings A1880
The following code shows some minor problems in Jabaco 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 Option Explicit Public Sub Command1_Click() Dim c As Char Dim cArr(1 To 10) As Char Dim cArr2() As Char Dim s As String ' initializer with scalar (= non-array) function call compiles OK Dim i As In...
James D. McCaffrey published a fascinating article on "Natural Algorithms" Use Bee Colony Algorithms to Solve Impossible Problems in the April 2011 edition of MSDN Magazine. I've ported his VB.Net code to Jabaco: index.php?page=Attachment&attachmentID=275 During my experiments, I've made the following observations: The Jabaco application finds the optimal solution most of the time while the published code doesn't (I have no clue, why this happens. This is left as an exercise to the reader ...)Th...
You can define "UserControls" and put them onto your form. A UserControl is a kind of form within a form. It groups controls which somehow belong together. This is helpful if you have re-occurring constellations of controls in your form. In one of my projects I had a lot of textbox+label combinations. So I defined a UserControl and inserted it several times. Another application of UserControls is to structure your controls and reduce complexity. Give it a try and post your experiences. Greetings...
Here is a sample how to use random access files: 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 Option Explicit ' ' demo for random file access ' #Import java#io#RandomAccessFile Public Sub Command1_Click() Dim fileName As String = "myFile.bin" Const recLen = 80 ' common record length Dim nRec As Integer Dim s1 As String = "Good morning! I am String 1 with äöüÄÖÜß" Dim...
I've done the following experiment: Jabaco Source 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Option Explicit Public Sub Command1_Click() t "1,234" t "1.234" t "1,234.56" End Sub Private Sub t(s As String) Dim a As New VBVariant(s) Dim x As Double = a.doubleValue() Debug.Print s & " = " & x End Sub The debugging output: Source code 1 2 3 4 ... 1,234 = 0.0 1.234 = 1.234 1,234.56 = 0.0 My suspicion is that Val() constructs a string using the local decimal separator (in Germany the comma). This string is then...
OK. So it is actually possible to use FileListBox and DirListBox. But faint hearted developers might still consider using CommonDialog until FileListBox and DirListBox get properly integrated in Framework and IDE. The big value of the examples is that they demonstrate ease and flexibity to create user specific controls and integrate them in Jabaco projects. Thanks for sharing! Greetings A1880
Val() is a Jabaco framework function implemented in "Conversion.java". You are right, it mostly/always returns 0.0 There seems to be a bug in the framework implementation. I've tried to trace it down. It seems to be in VBVariant.doubleValue(), but I'm not sure. For the time being, you could use CDbl() to circumvent the problem. Add a new Module to your project with the following content: Jabaco Source 1 2 3 4 5 Option Explicit Public Function Val(expression As String) Val = CDbl(expression) End ...
Thanks for this hint/correction. How do I include these new controls in my projects? They don't appear in the list of controls within the IDE. Is it enough to use a "new FileList()"? The following does not work: Jabaco Source 1 2 3 4 5 6 Public Sub Command1_Click() Dim d As New FileListBox() d.Parent.show() Debug.Print d.List(1) End Sub Is the list of controls automatically derived from the Jabaco.jar? Is it necessary to edit some configuration files? Greetings A1880
Yes, you are right. The DirListBox and FileListBox still have to be added to the Jabaco framework. Greetings A1880
It might help to scale the original image to the desired width x height before using it as image in a label. Another option would be to use a PictureBox control to display the image. Please post your findings Greetings A1880