Search results
Search results 381-400 of 500.
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.
Hi, in VB6 I can use double quotes inside a String. Example: Source code 1 Msgbox "He said ""hello, sailor!"" to me ..." In Jabaco, I have to use Chr(34) instead? Source code 1 Msgbox "He said " & Chr(34) & "hello, sailor!" & Chr(34) & " to me ..." I have tried "\"", but this does'nt work either. Am I missing something? Cheers! A1880
Hi, actually, "Frame" does have Width, Top and Left as properties: http://www.jabaco.org/doc/VB/Frame() Have I missed your point? Greetings A1880
Hi, try the following: Source code 1 2 Me.add Shape1 Me.Refresh Note that I replaced "Form1" by "me", because I am referring to the form variable rather than to the form class. It leads to misunderstandings to name the form variable Form1. The variable should be named differently from the class to avoid confusion. Greetings! A1880
Please have a look here. You may find the "search" function of this board worth trying. It helps you to spot existing solutions and hints. Happy digging! A1880
Hi, you are right! The "New" of a Form initiates a "Form_Load" of this form I figure, "Show" is just the opposite of "Hide". So, a form is loaded in the first place to initialize it. To avoid loading all three forms, I'd suggest the following: Source code 1 2 3 4 5 6 7 8 9 10 Public MyForm1 As New Form1 Public MyForm2 As Form2 Public MyForm3 As Form3 Public Sub main(ByJava args() As String) Dim myArgs() As String myArgs = args MyForm1.SetDefaultClose() MyForm1.show() End Sub The "MyForm2 = New F...
Hi, I've entered the following: Source code 1 2 3 4 5 6 7 8 9 10 Public Form1 As New Form1 Public Form2 As New Form2 Public Form3 As New Form3 Public Sub main(ByJava args() As String) Dim myArgs() As String myArgs = args Form1.SetDefaultClose() Form1.show() End Sub In Form1, I have the following code: Source code 1 2 3 Public Sub Command1_Click() Form2.Show End Sub When I click button Command1 on Form1, I get Form2. No problem. It is a bit misleading to name variables exactly like their respecti...
Hi, properties like "top" and "left" don't change the form position in "Form_Load". "Me.Refresh" does not help either. Try using "Form_Resize" instead. Use a flag variable to distinguish between 1st resize and normal resize. Strangely enough, "Form_Resize" gets called four times after the initial Form_Load without any resizing taking place. Greetings! A1880
Hi Manuel, Jabaco 1.5.0 does clean the working directory. But the empty directory (including res subdirectory) is not deleted. Greetings! A1880
Hi, I noticed that "byte" variables are different from "integer" variable with respect to automatic conversion to String. My test code: Source code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Private Sub toStringText Dim s As String Dim b As Byte = 5 Dim i As Integer = 6 Dim ll As Long = 7 Dim ib As Integer debug.Print b ' gives an unprintable character (ASCII code 5?) ib = b debug.Print ib s = b debug.Print s ' gives an unprintable character (ASCII code 5?) s = i debug.Print s s = ll ...
OK! What is "kaum macht man's richtig, funktioniert's auch!" in English? Cheers! A1880
Hi, I tried your code and implemented some testing routines: Source code 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 sh(0 To 15) As Integer = ( &H1, &H2, &H4, &H8, _ &H10, &H20, &H40, &H80, _ &H100, &H200, &H400, &H800, _ &H1000, &H2000, &H4000, &H8000, _ &H10000, &H20000, &H40000, &H80...
Hi Manuel, "flood the directory through the exe-wrapper" sounds not feasible, but I don't have more than a vague picture what you mean by this. The exe-wrapper unpacks itself to a temporary Jar which is then executed by by Java/JVM. I don't know if and how one could possibly change the working directory of a running JVM. But Jabaco could at least make sure that the JVM is started in the respective project directory for debugging regardless how you start Jabaco. Cheers A1880
Hi, in VB6 the Len() function returns the length of a string and the number of bytes used for a variable. That is useful if you want to estimate memory consumption or have to pass a structure of dynamic size to an external API. The following yields "0 14" in VB6: Source code 1 2 3 4 5 6 7 8 9 10 11 Private Type myType a As Integer s As String d As Double End Type Private Sub Command1_Click() Dim mt As myType MsgBox Len(myType) & " " & Len(mt) End Sub Jabaco does not compile this code. It expects...
Hi, well, I haven't said good bye to the idea of current working directories. Obviously, it is always possible to keep track of the current WD using some global variable. But all API I'm aware of do accept relative and absolute paths. So, it would be only consequent to forbid relative paths altogether and enforce the usage of absolute paths. It is not just print, write, read. Think of other resources organized in filesystem or URL/UNC based directories. Originally, a working directory was only a...
Hi, in VB6 "Format" is a handy function to format date/time strings and numeric strings. The current implementation in Jabaco is limited to dates and does not really work. "Timer" is a useful function returning the time since mindnight in seconds. My current experimental version: Source code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Public Function Format(x As Double, fmt As String) As String Dim df As New java#text#DecimalFormat(fmt) Format = df.format(x) End Function Public Functio...
Hi, in VB6 one could start external processes using "Shell()". The same is possible using "Interaction.Shell()" in Jabaco. There is one difference, though. The VB6 Shell returns the process ID and thus makes it possible to deal with the newly created child process later on. Standard Java APIs in general do not provide this type of information. Runtime.exec() returns a "Process" without exhibiting the process handle or ID. Any ideas how to create a "Shell()" with proper PID result? I've been expe...
Hi, I noticed that the current working directory of a Jabaco application varies depending on how it is started. If you first start the Jabaco IDE and then start your application using F6, you get a different WD compared to what you get double-clicking the project file and then starting the application. This reminds me of similar effects in the VB6 IDE. Digging the internet about Java and current working directory, I've got the impression that this concept is regarded "not platform independent" a...
Hi all, I experimented with RichTextBox controls and HTML. It is possible to load HTML content into a RichTextBox. But I haven't succeeded in writing the RichTextBox to HTML. Source code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Public Sub RichTextBox_LoadFileHtml(RTB As RichTextBox, aFileName As String) Dim fis As New FileInputStream(aFileName) Dim doc As New HTMLDocument Dim kit As New HTMLEditorKit doc.putProperty "IgnoreCharsetDirective", New Boolean(True) RTB.Parent.setEditorKit...
Hallo, hier ist mein Vorschlag für DateDiff() und Co. Source code 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 92 93 94 95 96 97 98 99 100 101 Option Explicit 'http://msdn.microsoft.com/de-de/library/b5xbyt6f(VS.80).aspx Public Function DateDiff(Interval As String, Date1 As Varian...
Hi, grundsätzliche müsste DateDiff so funktionieren: Je nach gewähltem Intervall werden für beide Zeitpunkte die Einzelwerte berechnet. Beispiel: bei "d" die Tage, bei "yyyy" die Jahre, bei "ww" die Kalenderwochen, etc. Das Ergebnis ist dann die Differenz dieser beiden Werte. Vermutlich liegt das Hauptproblem bei der Realisierung darin, dass sich die Implementation genau so verhält, wie die von VB6. Was geschieht bei nicht existierenden oder vertauschten Datumsangaben? Wie wird genau gerundet? E...