• Welcome to Jose's Read Only Forum 2023.
 

Is it time to for vb to RIP?

Started by Paul Breen, November 16, 2010, 03:54:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Paul Breen

Fred:
I appreciate the cpp and pb dll examples especially and I know no one wants to let the old vb based on com go . . . but . . .vb 6 has been dead a long time.
I tried to buy vb6 and we're talking four to six hundred dollars on ebay, depending on how trusting you are. How can we use pb with the new vb that uses net? Does'nt free (express version) sound a lot better than five hundred dollars? Is there a way to do similar things with a net language?
thanks,
Paul Breen

Frederick J. Harris

#1
Hi Paul!

    Havn't heard from you in awhile!  I posted the Visual Basic 6 example due to a question from another member who had some VB6 COM Dlls and C++ COM code which he was hoping to translate to PowerBASIC.  So that's where that came from.  Since VB6 is essentially 10 year old technology, I thought what I posted might be useful to others wanting to port old code to newer PB versions.

    I almost hate to see VB6 go by the wayside, having spent so much good time with it through the 90s, but I guess that's the way it is.  I know a lot of PowerBASIC users didn't like the old Visual Basic, but I loved it.  

    In terms of translating a .NET class to a PowerBASIC class, I think that would be quite straight forward - especially VB.NET.  Two summers ago I bought myself the pro version of Visual Studio 2008, and that cost me about US $550.  I bought it mostly for Windows CE/Mobile work I do, but I became fairly fond of the included VC++9.   I've only playred around with the VB.NET to see if I could connect to the various COM objects I was building in C, C++, and PowerBASIC.  

    I know Jose has done some interesting work connecting to .NET classes in the framework from PowerBASIC, and at some point I'd like to study in detail what he has done, but I just havn't gotten around to it.  There's still a lot of other stuff I havn't figured out yet that I'm working on.

    You know, I'm not even sure if you can make a straight COM Dll with VB.NET or not the way you used to be able to with VB6.  I see with VC++9 there is a new version of ATL for making C++ COM objects and ActiveX controls, but I'm not sure with VB.  

     Connecting to either a PowerBASIC standard Dll or a COM object with .NET is quite easy if that is your question.  In that exe out of process server example I posted, and the COM Visual Control (ActiveX control, whatever) example I just posted, I provided .NET examples.  Basically, when you set up a project you have a references tab under project properties where you select the 'COM' tab and add your reference to the COM registered component.  .NET then creates wrappers very similiar to the output from the PB and Jose's COM browser to allow the access.  What I'd like to find out is if there is a stand alone command line tool in .NET that does this and if there is, I'd like to look into how it is used.  I'd like to be able to work strictly from the command line in .NET too.  I can for regular stuff, but I'm not sure exactly how .NET generates its COM wrappers.

   

Paul Breen

I have visual studio too but only installed c++ because it is the only native code language in VS. Now I am not so sure that .net is not a good idea for some things. By the way, there is a sp1 for vs 2008 and it is absolutely humongous to download and install even on fast connections. I will dig out the dvd and see what .net can do for me and powerbasic.

FYI: I have been looking at rad studio xe and they have dropped ATL for com and now c++ uses the delphi setup for com. You get the c++, delphi native, delphi .net, and php something or other in rad studio but only if I can get the school discount (100$ vs ~800$). There is an add-on that lets you use net delphi and native delphi interchageably somehow in the same project. They call it hydra but no discount for that. see it at
http://www.remobjects.com/hydra/

Frederick J. Harris

Only a few days after PowerBASIC Version 9 came out (a little over two years ago) I posted this...

http://www.powerbasic.com/support/pbforums/showthread.php?t=38248&highlight=Old+McDonnald

over at the PowerBASIC forum in Source Code I believe.  Its your typical class demonstration using animals that you find in a lot of OOP tutorials.  However, I also posted the VB.NET version, which can be compiled from the command line.  You don't need any IDE, i.e., Visual Studio, nothing.  The Command Line compilation string is there and I think also directions for setting it up.  Of course, all .NET stuff goes in the same place on Windows computers.  Its a good example though comparing the exact same syntax in PB vs. VB.NET.

Just the other week for no reason I can think I pulled out my old Borland C++ Builder from around 2000 or so and was reading through the documentation.  I never used it hardly at all, but I find it interesting what they did with it.  As part of the C++ GUI framework package they actually used Delphi's ActiveX COM Controls!  I find that interesting.  The whole thing got me to wondering what ever happened to Borland (they were huge in development tools, i.e., compilers, etc.) back in the 80s and 90s.  So I read up on it some on Wikipedia.  I guess Microsoft did them in finally.  Too hard to compete in the development tools space.