Search results
Search results 161-180 of 277.
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 @All, ever heard about Bit Shifting? In Visual Basic Classic it is not often used, because there are two things that makes it hard to use: 1. There is neither a special syntax nor a intrinsic function for it 2. by default VB does Integer overflow checks. (dt: Überprüfung auf Ganzzahlüberlauf) for 2: you could switch this behaviour off: * click the menuitem "Project"->"Properties of <MyProject>" and * click the tab "Compile" * click the button "Advanced Optimizations" * check: "Remove Integer ...
Hi, first: due to VB6, when working with UD-Types and API-functions, never use Len, but use LenB instead. Jabaco Source 1 2 3 4 5 6 7 8 9 10 11 12 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) MsgBox Len(mt) & " " & LenB(mt) End Sub As you may know, the reason for that is: padding bytes but you got to keep calm, normally all UD-Types concerning the win-API have a 4-byte alignment. by the way: ad...
Hi A1880, I do not think that it has something to do with Java, or even not with platform dependency. please give us a definition of "current working directory".please give us an example, in which ways did you use it. Excerpts from the VB5-help Quoted CurDir Function Syntax CurDir[(drive)] The optional drive argument is a string expression that specifies an existing drive. If no drive is specified or if drive is a zero-length string (""), CurDir returns the path for the current drive. Quoted ChD...
Hi, loading rtf or htm and writing rtf or htm means converting between each other easy going with the function JTextPane.getEditorKitForContentType Jabaco Source 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Public Sub RichTextBox_SaveFileHTM(RTB As RichTextBox, aFileName As String) RichTextBox_SaveFile(RTB, aFileName, "text/html") End Sub Public Sub RichTextBox_SaveFile(RTB As RichTextBox, aFileName As String) 'default because RichText = rtf RichTextBox_SaveFile(RTB, aFileName, "text/rt...
Hi A1880, don't really know, sorry less time at the moment, some ideas: * Serializing -> will it be possible in Jabaco? * Editorkit.write has the ability to use a specific writer -> haven't tried it yet, but maybe a htmlwriter could be useful: javax#swing#text#html#HTMLWriter OlimilO
Hallo A1880, Danke für den Code das sieht ja wirklich gleich viel besser aus! Ich werde das noch ein wenig testen und dann vermutlich so übernehmen. Vielen Dank nochmal OlimilO
Hi A1880, Quoted Bei Deiner DateDiff-Implementierung gibt es noch einen Haken: Man kann die Zeitdifferenzen nicht einfach auf einen Faktor zurückführen. Beispiel: Wenn die Kalenderwochen als Intervall gefragt sind, muss man für beide Daten jeweils die Kalenderwochen ermitteln und die resultierenden Wochenangaben voneinander abziehen. So ergibt sich zwischen "Montag 20.07.2009 00:05" und "Sonntag 19.07.2009 23:55" eine Wochendifferenz von 1, obwohl nur 10 Minuten dazwischen liegen. Ja, Danke für ...
hi klctal, how would you do it in VB? regards OlimilO
zum testen hab ich folgenden Code verwendet, der läuft auch unter VB6: Jabaco Source 1 2 3 4 5 6 7 8 Private Sub Command1_Click() Dim d1 As Date: d1 = DateSerial(2009, 1, 1) '"01.01.2009" Dim d2 As Date: d2 = Now Dim ts As Long: ts = DateDiff("n", d1, d2) Label1.Caption = CStr(ts) Label2.Caption = CStr(d1) Label3.Caption = CStr(d2) End Sub
Hi, ich hab fürs Framework zwei Funktionen zur Komplettierung von DateTime nachprogrammiert: DateDiff und DateSerial, Leider verrechnet es sich um eine Stunde bzw 60minuten. Weiß jemand warum? Hat das mit der Sommerzeit zu tun? Bzw hat jemand einen Verbesserungsvorschlag? Modul MDateTime 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...
@A1880: habs mir nochmal angeschaut ... @klctal: you could use this instead Jabaco Source 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Import javax#swing#text Import javax#swing#text#rtf Public Sub Command3_Click() CommonDialog1.ShowOpen If CommonDialog1.IsCanceled Then Exit Sub RichTextBox_LoadFile(RichTextBox1, CommonDialog1.FileName) End Sub Public Sub RichTextBox_LoadFile(RTB As RichTextBox, aFileName As String) Dim fis As New FileInputStream(aFileName) Dim doc As New DefaultStyledDocument(New ...
@A1880: superspitzenmäßig! @klctal: Quoted the DefaultStyledDocument class was not found in Jabaco klick the menuitem "Project"->"References (Classpath)" The dialog "Imports" appears, in the box "Classname" type: DefaultStyledDocument and click "Find Class" You see that it will be found in the namespace javax#swing#text, now just activate the checkbox left from the class and close the dialog Alternatively you could also write into your Code: Import javax#swing#text above the line: Import javax#s...
Hi klctal, Quoted Could somebody tell me how to read a multi lined document? Yes, please show me your code. How would you do it in VB? we could try to post a code that is very close to the VB-syntax. regards OlimilO
kaindorfer found out Datediff is missing in class (module) DateTime datediff
Hi theuserbl , Quoted So, now to all the other: Put your known bugs and bug-fixes for the Framework here in the thread. good idea! I also found: 1. the property ToolTip of the Jabaco TextBox control, in the VB-TextBox it is ToolTipText 2. when opening a VB-project with Label-controls on it, the properties will not be imported correctly: Backstyle (solid, transparent) and Textalign (left, center, right) OlimilO
Hi Amit, before you dig more deeper: Also loading new controls into controlarrays with the Load-procedure is not possible until now. There is plenty of work left for Manuel For compiler related stuff the only help we can serve is posting problems together with solutions The LBound and UBound-functions normally will be used for iterating through the array. But since we have For Each you could do it like this: VB6-Code: Jabaco Source 1 2 3 4 5 6 Dim pic As PictureBox For Each pic In Picture1 If No...
Hi theuserbl, thanks for the idea. There is a similar option in Jabaco: In the project-explorer select your projectname (the very above item), then look into the properties editor. Right next to the "Compile"-item you can select "Bytecode" or "Debug". regards OlimilO
Hi A1880, 1. Quoted VB6 changes the case of variable names ... but I would love to have it back in Jabaco I totally agree with you in this point, imho this is one of the most important features of VB and I love it either, but of course one can also go without it, as Jabaco does, if you force yourself to spell your variable names correctly. 2. Quoted From "a=b+1", VB6 would automatically make "a = b + 1". i have a love-hate-relationship to this feature. OK somehow it could be useful, but in VB yo...
Hello Amit, in VB6 there are two functions to create a String: Space: returns a string variable with the given length of space-characters String: returns a string variable with the given length of the given character Jabaco Source 1 2 3 'VB6-Code MsgBox String(10, "#") MsgBox "#" & Space(10) & "#" in Jabaco afair there is none of these. especially "String" is a special keyword that denotes the type of a variable. But if you alter it a little bit, you could very easily write it down like this: Ja...
Hello turkulainen, in the project-explorer of Jabaco click "Project" then look into the property-editor you will find a property named "Symbol" there, simply select your icon. I must admit i have not tried it yet, so please report if it was succesfull regards OlimilO