Author Topic: VB6 not dead  (Read 37927 times)

Offline John

  • Forum Support / SB Dev
  • Posts: 3597
    • ScriptBasic Open Source Project
VB6 not dead
« on: December 27, 2016, 01:39:34 PM »
I'm having good luck using VB6 IDE on Windows 7 and generating OS level supported applications for Windows 7 - 10 using the current default Windows theming.

I'm curious if there are other VB6 programmers that would like to keep the candle burning with the hopes Microsoft will someday open source it?

The purpose for this post is to get feedback how others feel.

Quote
"B4J is being used by our growing developer community to roll out real-world apps that solve everyday business problems faster than ever before," he said. "Based on the feedback we've received, B4J is being welcomed as an effective and long-awaited successor to Visual Basic."


« Last Edit: December 27, 2016, 06:18:53 PM by John »

Offline AlyssonR

  • Advocate
  • Posts: 131
Re: VB6 not dead
« Reply #1 on: December 28, 2016, 03:15:11 AM »
I still use VB6 on my Win 7 kit - the only problem is when using the .exe on a different machine due to that £$%^&* code signing thing, since you can't simply tag an application as safe and you have to allow it to run every time.

Both the IDE and the apps run smoothly and reliably on Win 7 both on 32 and 64 bit systems.

Offline John

  • Forum Support / SB Dev
  • Posts: 3597
    • ScriptBasic Open Source Project
Re: VB6 not dead
« Reply #2 on: December 28, 2016, 09:51:42 AM »
Quote
the only problem is when using the .exe on a different machine due to that £$%^&* code signing thing,

Allowing an Unsigned Application to Run As Normal

Can you expand on that? I don't seem to have any issues running VB6 apps on XT, Win7 or Win10 no matter what version of Windows they were created on.

Quote
Hi,

try the following links:

http://www.vbforums.com/showthread.php?t=347478

http://objectmix.com/basic-visual/156510-digital-signature-my-vb6-app.html

http://www.tek-tips.com/viewthread.cfm?qid=1319134&page=161

Hope it helps.

Regards,
A.Murugan

It looks like if the .exe was created on XP, the code signing isn't a requirement.
Quote
All part of the phaseout of COM I suppose, but the API can be used with a little more pain.  It just means you'll want to do your Vista builds on XP, or at least your code-signing and possibly your MSI installer builds on XP.

Even Microsoft has stated that VBA (COM/OLE) is still the preferred and feature rich scripting method in Office today.



« Last Edit: December 28, 2016, 08:48:21 PM by John »

Offline AlyssonR

  • Advocate
  • Posts: 131
Re: VB6 not dead
« Reply #3 on: December 29, 2016, 09:45:58 AM »
Win 7 requires executable code to be signed with a current  certificate - it is self-certificated if you run it on the machine that it was compiled on.

When you develop using VB6, the resulting program runs seamlessly on the development system, but if you install it elsewhere, then execution is interrupted with the Windows User Account Control pop-up asking if you want the program to be allowed to make changes on your computer.


Mike Lobanovsky

  • Guest
Re: VB6 not dead
« Reply #4 on: December 29, 2016, 11:02:19 AM »
Wow-wow-wow!

You shouldn't use the words "installer", "setup", "updater", "patch" and the like to name your program if it isn't one! Windows UAC is trained to be aware of such names and would automatically require elevated privileges from the user that they might not have.

And even if it is a true installer/etc. supplied with an explicit standalone file or embedded resource manifest defining a "requireAdministrator", rather than "asInvoker", attribute for your application, the target user will still be prompted by UAC to allow/accept the changes the installer is going to introduce to their file system.

All this letting alone the fact that 99% of VB6 applications wouldn't have any manifest at all...

Offline John

  • Forum Support / SB Dev
  • Posts: 3597
    • ScriptBasic Open Source Project
Re: VB6 not dead
« Reply #5 on: December 29, 2016, 12:46:15 PM »
Quote from: Mike
All this letting alone the fact that 99% of VB6 applications wouldn't have any manifest at all...

The only manifest I'm using is for Windows 7 theming support for the VB6 IDE. All VB6 applications I create use the replacement MSCOMCTL.OCX that auto registers itself. I'm using Inno to create the SB-Setup.exe which as you say should set up permissions at install time.

Mike Lobanovsky

  • Guest
Re: VB6 not dead
« Reply #6 on: December 29, 2016, 02:27:15 PM »
Structurally, a VB6 application is faultless from the MS Windows perspective and doesn't require any extra activities on behalf of its developer or user to get it up and running on any Windows machine. Neither do the C applications created with the older VC6 Visual Studio that VB6 was bundled with back at the time. In fact, the C2.exe compiler that you can find in the VB6 installation is a somewhat enriched pre-VC6 C++ compiler back end (can't recall now if it was a VC3 or VC4 compiler) that's used to translate the VB6 sources to equivalent C++ and to build "standalone" (in fact, MSVBVM60.DLL-bound) VB6 executables. Since MS' support for all this SW was dropped long ago, it's only natural that neither of them has ever had any associated manifest tool.

To the best of my knowledge, MS has promised to include the MSVBVM60.DLL library (VB6 official runtime) into every future release of Windows at least till the year 2025. The only new feature a VB6 application (or a VC6 application as well, for that matter) may ever need to acquire a "modern" look is a standalone (a.k.a "side-by-side") manifest file that would bind it to a contemporary set of Windows common controls. Microsoft's recommended mantras for application manifests can be found here.

Since your applications, John, are already bundled to a custom control library (MSCOMCTL.OCX where .OCX = .DLL) that's already equipped with a manifest, they can get by without an own manifest unless they need to have some system-wide features enabled that aren't specified in MSCOMCTL.OCX' minimalistic manifest. Installers/patchers/setups are an example where such extra manifests would be welcome.

Alternatively, VB6 and VC6 executables may have manifests embedded in their disk files forever as internal resources using 3rd party software such as e.g. ResHacker.

One more thing to note: while intelligent business AV software like paid Kaspersky, ESET Nod32, Symantec Norton, Microsoft Essentials and a few others would never flag a manifest-less but well behaved VB6 application as potential malware, "free" antiviruses like Avast, AVG, Avira and similar low-end AVs aplenty at VirusTotal.com and similar sites tend to throw false alarms just on account of such applications having no associated manifest file and/or embedded manifest and/or version info resource.

VB6 has always been, and still is, an awesomely feature rich and most user friendly programming environment; probably the best of the kind even if not the fastest.

Offline John

  • Forum Support / SB Dev
  • Posts: 3597
    • ScriptBasic Open Source Project
Re: VB6 not dead
« Reply #7 on: December 29, 2016, 02:38:46 PM »
Quote from: Mike
VB6 has always been, and still is, an awesomely feature rich and most user friendly programming environment; probably the best of the kind even if not the fastest.

I couldn't agree more.

The MSCOMCTL.OCX replacement (and others) is more than a manifest mapping library and updates many of the common controls to their current revisions, fixes bugs and enhances properties and methods.

VBFourms thread

It was a huge loss when Dave had to give up extending the SB COM interface due to medical issues.  What he left us is more than usable.


Attached is the ComCtlsDemo referenced on the VBForums site.
« Last Edit: December 29, 2016, 09:53:00 PM by John »

Offline AIR

  • BASIC Developer
  • Posts: 932
  • Coder
Re: VB6 not dead
« Reply #8 on: December 30, 2016, 08:46:13 PM »
/peeks over fence....

Personally, I was a Delphi user.  VB6 was/is very easy to work with, but in the early days was subject to the so-called "DLL-HELL" syndrome, which is why I drifted to Delphi.

At work, we still use quite a few VB6 programs on the PC side.  Some things just do the job as designed (as long as you stay away from the old-school OCX files that auto-updated - UAC has a rough time with those!)

BTW, Season's Greetings, I know it's been a while!

AIR.

Offline John

  • Forum Support / SB Dev
  • Posts: 3597
    • ScriptBasic Open Source Project
Re: VB6 not dead
« Reply #9 on: December 30, 2016, 10:47:40 PM »
Great to have you back AIR!

Hope you're doing well.

Offline AlyssonR

  • Advocate
  • Posts: 131
Re: VB6 not dead
« Reply #10 on: December 31, 2016, 03:02:04 PM »
One of the first things I learned when using VB was to ensure that the executable was packaged with whichever .DLL, .OCX and resource files it required locally, i.e. in/below the executable directory.

That even included a copy of shell32.dll for any system icons that may be referenced - surprisingly, that fixed a couple of installation problems when compiling on Win 98 and installing on NT4, back in the day.

While it may be necessary to access registry settings, I found that using program.ini for program settings was an absolute godsend, and avoiding a lot of mucking about with installers - my installs were all done with batch files and a configuration utility. Clunky, slow and very reliable.

Offline John

  • Forum Support / SB Dev
  • Posts: 3597
    • ScriptBasic Open Source Project
Re: VB6 not dead
« Reply #11 on: December 31, 2016, 04:49:57 PM »
Your VB6 app is required to regsrv32 and unregister the custom OCX (s) it uses. The VBCCR13.OCX I'm using does that for me automatically.


« Last Edit: December 31, 2016, 09:44:33 PM by John »

Mike Lobanovsky

  • Guest
Re: VB6 not dead
« Reply #12 on: January 01, 2017, 04:53:27 AM »
You can link your VB6 Classic/VB6 CE custom controls into your VB6 executables, in which case you won't have to register anything at all on the target machine if your application has no use of external COM by design or intended purpose. Regardless of VB6's own engine being a transparent 100% COM solution. :)

Offline John

  • Forum Support / SB Dev
  • Posts: 3597
    • ScriptBasic Open Source Project
Re: VB6 not dead
« Reply #13 on: January 01, 2017, 08:32:37 AM »
Quote
VB6's own engine being a transparent 100% COM solution.

I feel this is the reason developers have been able to  keep VB6 relevant without source.

Mike Lobanovsky

  • Guest
Re: VB6 not dead
« Reply #14 on: January 01, 2017, 09:04:20 AM »
Nah, they usually tailor it to their needs via its MSVBVM60.DLL's undocumented API and/or vtable patches to redirect program flow to custom callbacks and expose the otherwise unavailable pointers to VB6 intrinsic objects (essentially COM variants).