|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
PowerBASICAnybody here use PowerBASIC in conjunction with VB 6 stuff? Pluses,
negatives, anyone? -- Pete B On Mon, 22 Jun 2009 16:27:39 -0500, Pete B wrote:
>Anybody here use PowerBASIC in conjunction with VB 6 stuff? Pluses, Yep. :-)>negatives, anyone? Pluses: * PB allows to bypass some limitations of VB6 (pointer arithmetics, calling functions by their addresses, calling DLLs using calling conventions other than stdcall, inline assembler if needed, flexible Type declarations regarding byte alignment ...) while still using BASIC syntax (the syntax ist a little different here and there, though). * support for creation of COM servers since ver. 9.0; this was - a least in conjunction with VB - a little shaky initially but made a huge step in ver. 9.1; I still don't use this feature in production releases but most probably I will soon. Features regfree instanciation of in-process COM servers. * Really tiny compiles Neutral: * Support. The support desk responds very fast and is usually helpful, except when you ask the wrong questions. ;-) The online community is pretty active in the PB forums, however I generally prefer unmoderated newsgroups over moderated forums, but the latter have 99% of the traffic. What I really dislike is that PB Inc. claims intellectual property for everything posted in their forums. * Cost: Actually this should be under "pluses" because it is really affordable, they also give you a full moneyback guarantee if you are unhappy with the product; updates are free for the major release you purchased. Why I say "neutral" is that I think they should charge *more* for their product which would allow them faster release cycles. Negatives: * This probably doesn't apply to your question since you asked for PB in conjunction with VB6, but ... UIs are still pretty complicated to implement. There are some helper tools available, but basically creating UIs is pretty low level stuff, far from the comfort that VB offers. In short, PB is not a RAD tool like VB, but together they are actually perfect. Almost all of my VB projects today come with a DLL written in PB. And if I ever need to write a service, I'd most like write it in PB. Unfortunately, like VB6, PB is closed source also ... ;-) I wrote a small article for my website regarding VB6 and PB, however it's in German. Anyway, feel free to ask if you have any questions. And sorry for "hijacking" your thread of recent, but there's a certain history behind it ... ;-) Hi Wolfgang
I read your post and finally saw the remark that I consider the biggest plus: the ease and versatility of writing DLLs that compile with no overhead and are easy as pie to incorporate into VB projects. And yes, the compiles are really compact and fast. Not sure what you mean about the UI design. Its true that PB itself is primitive in that area, but I use the Firefly GUI Designer by Visual Designer and it is very good, although the available controls and such are modest. PB is certainly cheaper than VS, true, but OTOH with VS you get the whole nine yards; PB makes you buy everything as a separate addin or package (e.g. database package, etc.) and even their forms designer costs $100 extra. So they are really quite getting their money in full. The new v 9.1 costs $199 if you buy fresh, that ain't chicken feed and does not come with much of what came with standalone VB 6 Pro back in the day for a hell of a lot cheaper (at the end you could get VB 6 Pro for $45 or so). They even charge you $45 for a CD from which you can print the manual! Anyway, it is a good marriage I'd say..... -- Show quoteHide quotePete B "Wolfgang Enzinger" <usenet200***@temporaryforwarding.com> wrote in message news:nluv35lu4tkl0fbndp2rdgv4e9ske81fdu@4ax.com... > On Mon, 22 Jun 2009 16:27:39 -0500, Pete B wrote: > >>Anybody here use PowerBASIC in conjunction with VB 6 stuff? Pluses, >>negatives, anyone? > > Yep. :-) > > Pluses: > > * PB allows to bypass some limitations of VB6 (pointer arithmetics, > calling functions by their addresses, calling DLLs using calling > conventions other than stdcall, inline assembler if needed, flexible > Type declarations regarding byte alignment ...) while still using BASIC > syntax (the syntax ist a little different here and there, though). > > * support for creation of COM servers since ver. 9.0; this was - a least > in conjunction with VB - a little shaky initially but made a huge step > in ver. 9.1; I still don't use this feature in production releases but > most probably I will soon. Features regfree instanciation of in-process > COM servers. > > * Really tiny compiles > > Neutral: > > * Support. The support desk responds very fast and is usually helpful, > except when you ask the wrong questions. ;-) The online community is > pretty active in the PB forums, however I generally prefer unmoderated > newsgroups over moderated forums, but the latter have 99% of the > traffic. What I really dislike is that PB Inc. claims intellectual > property for everything posted in their forums. > > * Cost: Actually this should be under "pluses" because it is really > affordable, they also give you a full moneyback guarantee if you are > unhappy with the product; updates are free for the major release you > purchased. Why I say "neutral" is that I think they should charge *more* > for their product which would allow them faster release cycles. > > Negatives: > > * This probably doesn't apply to your question since you asked for PB in > conjunction with VB6, but ... UIs are still pretty complicated to > implement. There are some helper tools available, but basically creating > UIs is pretty low level stuff, far from the comfort that VB offers. > > > In short, PB is not a RAD tool like VB, but together they are actually > perfect. Almost all of my VB projects today come with a DLL written in > PB. And if I ever need to write a service, I'd most like write it in PB. > > Unfortunately, like VB6, PB is closed source also ... ;-) > > I wrote a small article for my website regarding VB6 and PB, however > it's in German. Anyway, feel free to ask if you have any questions. > > And sorry for "hijacking" your thread of recent, but there's a certain > history behind it ... ;-) > On Mon, 22 Jun 2009 18:17:40 -0500, Pete B wrote:
>Not sure what you mean about the UI design. Its true that PB itself is I don't know that designer, I only tried PB Forms so far. It helps>primitive in that area, but I use the Firefly GUI Designer by Visual >Designer and it is very good, although the available controls and such are >modest. designing the UI indeed, but all of the event handling still takes place in a traditional WindowProc, and it drives me nuts to lookup all of the constants every time for every WinMsg I need to handle, that's what I meant. Definately not a RAD. It's more like fussing with C, just with a BASIC flavour. Is Firefly GUI Designer different in that regard? >PB is certainly cheaper than VS, true, but OTOH with VS you get the whole You're right, it sums up, but not to the price for VB I had to pay here>nine yards; PB makes you buy everything as a separate addin or package >(e.g. database package, etc.) and even their forms designer costs $100 >extra. So they are really quite getting their money in full. The new v 9.1 >costs $199 if you buy fresh, that ain't chicken feed and does not come with >much of what came with standalone VB 6 Pro back in the day for a hell of a >lot cheaper (at the end you could get VB 6 Pro for $45 or so). They even >charge you $45 for a CD from which you can print the manual! in Germany back then ... $45? No way. If memory serves me well I'd say it was almost ten times more. >Anyway, it is a good marriage I'd say..... No doubt about that.Nice thing about Firefly is it provides code when you design a form, really
pretty complete code, and as well it has a whole slew of samples to look at. I just play around with this stuff now, I am retired. PBWin is certainly good stuff. BUt in the end, I mainly use VB6. -- Show quoteHide quotePete B "Wolfgang Enzinger" <usenet200***@temporaryforwarding.com> wrote in message news:o2o245hr6bsagt8qum85qvc4tsns33qc20@4ax.com... > On Mon, 22 Jun 2009 18:17:40 -0500, Pete B wrote: > >>Not sure what you mean about the UI design. Its true that PB itself is >>primitive in that area, but I use the Firefly GUI Designer by Visual >>Designer and it is very good, although the available controls and such are >>modest. > > I don't know that designer, I only tried PB Forms so far. It helps > designing the UI indeed, but all of the event handling still takes place > in a traditional WindowProc, and it drives me nuts to lookup all of the > constants every time for every WinMsg I need to handle, that's what I > meant. Definately not a RAD. It's more like fussing with C, just with a > BASIC flavour. Is Firefly GUI Designer different in that regard? > >>PB is certainly cheaper than VS, true, but OTOH with VS you get the whole >>nine yards; PB makes you buy everything as a separate addin or package >>(e.g. database package, etc.) and even their forms designer costs $100 >>extra. So they are really quite getting their money in full. The new v >>9.1 >>costs $199 if you buy fresh, that ain't chicken feed and does not come >>with >>much of what came with standalone VB 6 Pro back in the day for a hell of a >>lot cheaper (at the end you could get VB 6 Pro for $45 or so). They even >>charge you $45 for a CD from which you can print the manual! > > You're right, it sums up, but not to the price for VB I had to pay here > in Germany back then ... $45? No way. If memory serves me well I'd say > it was almost ten times more. > >>Anyway, it is a good marriage I'd say..... > > No doubt about that. > "Pete B" <petescas***@comcast.net> wrote in message If you just want to make DLL's, you can use FreeBasic; it supports pointers, news:OO6CLB48JHA.2120@TK2MSFTNGP02.phx.gbl... > Anybody here use PowerBASIC in conjunction with VB 6 stuff? Pluses, > negatives, anyone? inline assembly, other calling conventions, function overloading, multithreading, Unicode, and variable initializers. You can use it to make standard DLL's with minimum dependency. There are samples included in the compiler, including Windows drivers. Compiled code doesn't require any runtime, but the IDE is not as sophisticated as VB, especially for Windows GUI applications. You have to deal with WM_XXX messages, or use one of GUI tool kits, such as GTK+, or perhaps Qt. Unfortunately, it's not compatible with VB6, and it's still in the beta stages, but some are using it for commercial applications already. Main page: http://www.freebasic.net Features: http://www.freebasic.net/index.php/about?section=features Compiler download: http://www.freebasic.net/index.php/download IDE: http://sourceforge.net/projects/fbedit/ GTK+ 2.0: http://en.wikipedia.org/wiki/GTK%2B Qt: http://en.wikipedia.org/wiki/Qt_toolkit Nobody wrote:
> use FreeBasic... to make standard DLL's with minimum dependency. Minimum as in zero, or minimum as in something more than that?"Karl E. Peterson" <k***@exmvps.org> wrote in message The minimum that I was able to get for a simple DLL that exports a simple news:%23llSfWF9JHA.2120@TK2MSFTNGP02.phx.gbl... > Nobody wrote: >> use FreeBasic... to make standard DLL's with minimum dependency. > > Minimum as in zero, or minimum as in something more than that? function that adds two numbers is: KERNEL32.DLL MSVCRT.DLL As reported by Dependency Walker. I am not sure if MSVCRT.DLL can be removed. Nobody wrote:
Show quoteHide quote > "Karl E. Peterson" <k***@exmvps.org> wrote ... Huh. Well, kernel32 is definitely there, no matter what. Seems like msvcrt is >> Nobody wrote: >>> use FreeBasic... to make standard DLL's with minimum dependency. >> >> Minimum as in zero, or minimum as in something more than that? > > The minimum that I was able to get for a simple DLL that exports a simple > function that adds two numbers is: > > KERNEL32.DLL > MSVCRT.DLL > > As reported by Dependency Walker. I am not sure if MSVCRT.DLL can be > removed. pretty much a given too, isn't it? I remember we had some sort of issue in Win95, but I haven't heard concerns about it since. Thanks...
Show quote
Hide quote
"Nobody" <nob***@nobody.com> wrote in message This the Visual C Runtime Library.news:uwFSuOG9JHA.3544@TK2MSFTNGP04.phx.gbl... > "Karl E. Peterson" <k***@exmvps.org> wrote in message > news:%23llSfWF9JHA.2120@TK2MSFTNGP02.phx.gbl... > > Nobody wrote: > >> use FreeBasic... to make standard DLL's with minimum dependency. > > > > Minimum as in zero, or minimum as in something more than that? > > The minimum that I was able to get for a simple DLL that exports a simple > function that adds two numbers is: > > KERNEL32.DLL > MSVCRT.DLL > > As reported by Dependency Walker. I am not sure if MSVCRT.DLL can be > removed. > Theoretically if you poked around with the PowerBasic linker you might statically link to the CRT, but you wouldn't want to. It would bloat the file size dramatically and make the application immune to possible security and system updates. It is shipped with all versions of Windows. -ralph -ralph
Show quote
Hide quote
"Ralph" <nt_consultin***@yahoo.com> wrote in message I was talking about FreeBasic, which is a different product. It's free and news:%23eRKqLI9JHA.5780@TK2MSFTNGP03.phx.gbl... > > "Nobody" <nob***@nobody.com> wrote in message > news:uwFSuOG9JHA.3544@TK2MSFTNGP04.phx.gbl... >> The minimum that I was able to get for a simple DLL that exports a simple >> function that adds two numbers is: >> >> KERNEL32.DLL >> MSVCRT.DLL >> >> As reported by Dependency Walker. I am not sure if MSVCRT.DLL can be >> removed. >> > > This the Visual C Runtime Library. > > Theoretically if you poked around with the PowerBasic linker you might > statically link to the CRT, but you wouldn't want to. It would bloat the > file size dramatically and make the application immune to possible > security > and system updates. It is shipped with all versions of Windows. > > -ralph open source, and the compiler itself is written in FreeBasic, so I suppose one could examine it and remove that dependency if wanted...
Show quote
Hide quote
"Nobody" <nob***@nobody.com> skrev i meddelandet I guess it's like 4th then with a small kernel written in C.news:u$PvatL9JHA.1488@TK2MSFTNGP03.phx.gbl... > "Ralph" <nt_consultin***@yahoo.com> wrote in message > news:%23eRKqLI9JHA.5780@TK2MSFTNGP03.phx.gbl... >> >> "Nobody" <nob***@nobody.com> wrote in message >> news:uwFSuOG9JHA.3544@TK2MSFTNGP04.phx.gbl... >>> The minimum that I was able to get for a simple DLL that exports a >>> simple >>> function that adds two numbers is: >>> >>> KERNEL32.DLL >>> MSVCRT.DLL >>> >>> As reported by Dependency Walker. I am not sure if MSVCRT.DLL can be >>> removed. >>> >> >> This the Visual C Runtime Library. >> >> Theoretically if you poked around with the PowerBasic linker you might >> statically link to the CRT, but you wouldn't want to. It would bloat the >> file size dramatically and make the application immune to possible >> security >> and system updates. It is shipped with all versions of Windows. >> >> -ralph > > I was talking about FreeBasic, which is a different product. It's free and > open source, and the compiler itself is written in FreeBasic, so I suppose > one could examine it and remove that dependency if wanted... > > There is no other way to write a programming language "in itself". You always need a core set of commands to start with. /Henning
Show quote
Hide quote
"Henning" <computer_h***@coldmail.com> schrieb im Newsbeitrag Not in each case.news:eDjqSvM9JHA.288@TK2MSFTNGP04.phx.gbl... > > I was talking about FreeBasic, which is a different product. > > It's free and open source, and the compiler itself is written > > in FreeBasic, so I suppose one could examine it and > > remove that dependency if wanted... > > > > > > I guess it's like 4th then with a small kernel written in C. > > There is no other way to write a programming language "in itself". > You always need a core set of commands to start with. Just google for bootstrapping and selfhosting... http://en.wikipedia.org/wiki/Bootstrapping_(compilers) And IMO the FreeBasic-Compiler does bootstrapping - per ASM. It compiles ByteCode for the GAC - but in the forums they also have an early version running, which is able to emit C-Source, which then in turn can be compiled with better optimizing C-Compilers. Also interesting in that regard is, where the really nice tinycc-compiler: http://bellard.org/tcc/ got his roots: http://bellard.org/otcc/ The otcc was a selfhosting compiler, already capable to understand a subset of the C-language in only 2048 Bytes of Source-Code. And that small C-like Compiler-Source was already able to bootstrap and compile itself. Compiling Compilers is also interesting with regards to security and potential backdoors (in the compiler itself): http://cm.bell-labs.com/who/ken/trust.html You can go straight to "Stage II" somewhat down the Website. Olaf
Show quote
Hide quote
"Schmidt" <s**@online.de> skrev i meddelandet Yes, but the lowest level of commands that can compile new commands, has to news:OAMf3AN9JHA.5704@TK2MSFTNGP03.phx.gbl... > > "Henning" <computer_h***@coldmail.com> schrieb im Newsbeitrag > news:eDjqSvM9JHA.288@TK2MSFTNGP04.phx.gbl... > >> > I was talking about FreeBasic, which is a different product. >> > It's free and open source, and the compiler itself is written >> > in FreeBasic, so I suppose one could examine it and >> > remove that dependency if wanted... >> > >> > >> >> I guess it's like 4th then with a small kernel written in C. >> >> There is no other way to write a programming language "in itself". >> You always need a core set of commands to start with. > > Not in each case. > Just google for bootstrapping and selfhosting... > http://en.wikipedia.org/wiki/Bootstrapping_(compilers) > > And IMO the FreeBasic-Compiler does bootstrapping - > per ASM. It compiles ByteCode for the GAC - but > in the forums they also have an early version running, > which is able to emit C-Source, which then in turn > can be compiled with better optimizing C-Compilers. > > Also interesting in that regard is, where the really nice > tinycc-compiler: http://bellard.org/tcc/ > got his roots: http://bellard.org/otcc/ > > The otcc was a selfhosting compiler, already capable to > understand a subset of the C-language in only 2048 Bytes > of Source-Code. And that small C-like Compiler-Source > was already able to bootstrap and compile itself. > > Compiling Compilers is also interesting with regards to > security and potential backdoors (in the compiler itself): > http://cm.bell-labs.com/who/ken/trust.html > You can go straight to "Stage II" somewhat down the > Website. > > > Olaf > > exist. In the 4th case its 512 bytes assembler code. From that you build higher level commands that integrates and extends the compiler, and so on. /Henning Does the compiler package include documentation?
I am a little confused, is this a Windows compiler or a DOS compiler? I did not see any real documentation about it on the links you listed. I saw the list of features etc. but that is not the same as a manual or online documentation. I get the feeling it is more a QB-type package than for Windows. I downloaded the compiler but I don't want to bother installing it if it does not have good documentation. -- Show quoteHide quotePete B "Nobody" <nob***@nobody.com> wrote in message news:%23oBSAK%238JHA.4560@TK2MSFTNGP03.phx.gbl... > "Pete B" <petescas***@comcast.net> wrote in message > news:OO6CLB48JHA.2120@TK2MSFTNGP02.phx.gbl... >> Anybody here use PowerBASIC in conjunction with VB 6 stuff? Pluses, >> negatives, anyone? > > If you just want to make DLL's, you can use FreeBasic; it supports > pointers, inline assembly, other calling conventions, function > overloading, multithreading, Unicode, and variable initializers. You can > use it to make standard DLL's with minimum dependency. There are samples > included in the compiler, including Windows drivers. Compiled code doesn't > require any runtime, but the IDE is not as sophisticated as VB, especially > for Windows GUI applications. You have to deal with WM_XXX messages, or > use one of GUI tool kits, such as GTK+, or perhaps Qt. > > Unfortunately, it's not compatible with VB6, and it's still in the beta > stages, but some are using it for commercial applications already. > > Main page: > http://www.freebasic.net > > Features: > http://www.freebasic.net/index.php/about?section=features > > Compiler download: > http://www.freebasic.net/index.php/download > > IDE: > http://sourceforge.net/projects/fbedit/ > > GTK+ 2.0: > http://en.wikipedia.org/wiki/GTK%2B > > Qt: > http://en.wikipedia.org/wiki/Qt_toolkit > > "Pete B" <petescas***@comcast.net> wrote in message You need to download it seprately under "Documents" heading below, which is news:OKT4X9O9JHA.1880@TK2MSFTNGP05.phx.gbl... > Does the compiler package include documentation? a CHM file. http://www.freebasic.net/index.php/download If you don't see anything in the help, right click the CHM file and look for "Unblock" button. This is a feature of XP+SP2 and after. See this picture to see where this button is hidden: http://geekswithblogs.net/images/geekswithblogs_net/evjen/65/o_chmfiles.gif Unfortuantly the OS doesn't tell you the file is blocked, and the button is hidden for normal and unblocked files, so most people don't know it's there. > I am a little confused, is this a Windows compiler or a DOS compiler? I It's for DOS/Windows 32 bit/Linux. 64-Bit support will be added later. The > did not see any real documentation about it on the links you listed. I > saw the list of features etc. but that is not the same as a manual or > online documentation. I get the feeling it is more a QB-type package than > for Windows. I downloaded the compiler but I don't want to bother > installing it if it does not have good documentation. compiler itself is command line only. To download the Windows version, under heading "Binaries", click on the icon to the right of "Windows". You need to install the following IDE after you install the compiler if you want easy to use interface, but don't expect something as simple to use as VB, especially for GUI applications. I haven't used GTK or Qt, so I don't know how to use them. http://sourceforge.net/projects/fbedit/ When you install the compiler, it also install several samples here: C:\Program Files\FreeBASIC\examples Each sample describes how you can compile it. You basically click on FreeBasic shortcut on the desktop, this brings a Command Prompt window with the path to the compiler is set in the Path environment variable, so you don't have to enter the path to the compiler. For example, start FreeBasic shortcut and type the following(Copy & Paste from the control menu): cd C:\Program Files\FreeBASIC\examples\dll\VB fbc fbside.bas -dll This creates a dll that you can use in VB6. There is a file in the same folder called "vbside.bas" that illustrates how to use that DLL in VB6. The sample shows how to create a string and return it to VB. There is a simpler example in "dll" folder, but you have to use <extern "windows-ms"> so VB6 can use it. Here is a full example, only 5 lines in the entire BAS file: Extern "windows-ms" Function AddNumbers(ByVal val1 As Integer, ByVal val2 As Integer) As Integer export Function = val1 + val2 End Function End Extern In VB side, you declare it like this: Declare Function AddNumbers Lib "test.dll" (ByVal val1 As Long, ByVal val2 As Long) As Long Integer in FreeBasic is 32-bit, Long is 32 or 64 bit depending on the platform, LongInt is 64-Bit, Short is 16-bit, Byte is 8 Bits. There is unsigned version of all of these. Also, see these tutorials:
http://www.freebasic.net/wiki/wikka.php?wakka=CommunityTutorials This came from the support page/Wiki tutorials. I also found that FB support multi-line comments: /' Some comment Line 2 '/ http://www.freebasic.net/index.php/codelib?section=view_code&id=1 For some reason I get a blank page sometimes, if this happen to you, just refresh the page. Ok I will give it a try, seems worth exploring. Thanks
-- Show quoteHide quotePete B "Nobody" <nob***@nobody.com> wrote in message news:uUYJo9S9JHA.288@TK2MSFTNGP04.phx.gbl... > Also, see these tutorials: > > http://www.freebasic.net/wiki/wikka.php?wakka=CommunityTutorials > > This came from the support page/Wiki tutorials. I also found that FB > support multi-line comments: > > /' Some comment > Line 2 '/ > > http://www.freebasic.net/index.php/codelib?section=view_code&id=1 > > For some reason I get a blank page sometimes, if this happen to you, just > refresh the page. > > > >
Web Pages in a VB Window?
String Memory Recovery Inno Setup and Dependencies Download multiple files concurrently using WinHttpRequest When the compiler freezes.... what is the rescue? can i do this with real database, not just dataset The JET VBA File...Help Please! Proxy + ADO + VB6... Macro to Print Text to file in UTF-8 JPEG File Compression |
|||||||||||||||||||||||