Author Topic: Script BASIC - VB6 OCX Forms  (Read 20410 times)

Offline AlyssonR

  • Advocate
  • Posts: 126
Re: Script BASIC - VB6 OCX Forms
« Reply #45 on: September 28, 2018, 01:32:45 AM »
Now that, I was aware of.

Offline John

  • Forum Support / SB Dev
  • Posts: 3561
    • ScriptBasic Open Source Project
Re: Script BASIC - VB6 OCX Forms
« Reply #46 on: October 03, 2018, 10:22:51 PM »
Here are a few links on COM and OLE automation courtesy of Eros.

I'm still trying to get to the bottom of how to use a VB6 OCX DLL in vtable mode rather than iDisptch.

Quote
V-table Interface

An interface definition has TypeKind = TKIND_INTERFACE. An interface is a set of pure virtual functions and an empty set of data members. If a type description contains any virtual functions, then the pointer to the VTBL is the first 4 bytes of the instance.

The type information fully describes the member functions in the VTBL, including parameter names and types and function return types. It may inherit from no more than one other interface.

With interfaces and dispinterfaces, all members should have different names, except the accessor functions of properties. For property functions having the same name, the documentation string and Help context should be set for only one of the functions (because they define the same property conceptually).


IDispatch Interface

These include objects (TypeKind = TKIND_DISPATCH) that support the IDispatch() interface with a specification of the dispatch data members (such as properties) and methods supported through the object's Invoke implementation. All members of the dispinterface should have different IDs, except for the accessor functions of properties.


Dual Interface

Dual interfaces (dual) have two different type descriptions for the same interface. The TKIND_INTERFACE type description describes the interface as a standard Component Object Model (COM) interface. The TKIND_DISPATCH type description describes the interface as a standard dispatch interface. The lcid and retval parameters, and the HRESULT return types are removed, and the return type of the member is specified to be the same type as the retval parameter.

By default, the TYPEKIND enumeration for a dual interface is TKIND_DISPATCH. Tools that bind to interfaces should check the type flags for TYPEFLAG_FDUAL. If this flag is set, the TKIND_INTERFACE type description is available through a call to ITypeInfo::GetRefTypeOfImplType() with an index of -1, followed by a call to ITypeInfo::GetRefTypeInfo().

« Last Edit: October 03, 2018, 10:32:46 PM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 3561
    • ScriptBasic Open Source Project
Re: Script BASIC - VB6 OCX Forms - VBCCR 1.6
« Reply #47 on: October 09, 2018, 04:03:37 PM »
Krool has release his 1.6 VBCCR common controls VB6 replacement OCX.

Release Notice

Quote from: Krool
I agree. VBCCR should not be the solution for everything. It is intended to get rid of the old OCX dependencies and to support Unicode. (and more handy, bugfixes, features etc..)
If new "modern" UI is needed then another alternative approach is better. (without comct32.dll)

« Last Edit: October 12, 2018, 08:55:33 PM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 3561
    • ScriptBasic Open Source Project
Re: Script BASIC - VB6 OCX Forms
« Reply #48 on: October 14, 2018, 06:22:20 PM »
The best example of a VB6 application interacting with the Script BASIC embedded, extension and preprocessor APIs is the SB IDE/Debugger for Windows 32 bit.

Offline John

  • Forum Support / SB Dev
  • Posts: 3561
    • ScriptBasic Open Source Project
Re: Script BASIC - VB6 OCX Forms
« Reply #49 on: January 13, 2019, 10:56:15 PM »
I'm really disappointed that this concept of using modern OCX form controls and calling back to Script BASIC functions and subs didn't create any excitement. VB6 was a favorite among the 32 bit developer world of COM OLE automation.

Did I waste my time with this?

Offline John

  • Forum Support / SB Dev
  • Posts: 3561
    • ScriptBasic Open Source Project
Re: Script BASIC - VB6 OCX Forms
« Reply #50 on: January 14, 2019, 07:29:02 PM »
I'm considering putting the Windows version of Script BASIC on the shelf until I have time to be a proper maintainer. I'm still on the fence if 32 bit is still worth investing in.

I'm curious how popular VB.Net is today and are companies developing custom apps like they did with Classic?


« Last Edit: January 14, 2019, 07:47:50 PM by John »

Offline AIR

  • BASIC Developer
  • Posts: 932
  • Coder
Re: Script BASIC - VB6 OCX Forms
« Reply #51 on: January 14, 2019, 10:51:07 PM »
I'm considering putting the Windows version of Script BASIC on the shelf until I have time to be a proper maintainer. I'm still on the fence if 32 bit is still worth investing in.

I'm curious how popular VB.Net is today and are companies developing custom apps like they did with Classic?

At one point, VB.net was popular in the corporate world because of ASP.net, but with the emergence of Node, Docker, etc, Enterprise devs have moved away from it (based on what I've seen, your experience may be different).

At work, we had an important legacy VB6/SQL application that had major issues working under Win 10 (My team and I came up with various workarounds, but with each security update that MS released we had to come up with new workarounds.  The main issue was 32bit OCX).  The decision was made to re-write it, and VB.net was never a real contender.  The application ended up being redone in C#.

As to 32 vs 64bit:  My choice would be 64bit.  If we were talking about a compiler that emits ASM, I would say stay 32bit (64bit ASM is a very different beast) but for an interpreter that supports interfacing with external libraries, 64bit is the way to go since it's getting harder to find up to date 32bit dll's for some major libraries.

Just my opinions...

AIR.

Offline John

  • Forum Support / SB Dev
  • Posts: 3561
    • ScriptBasic Open Source Project
Re: Script BASIC - VB6 OCX Forms
« Reply #52 on: January 15, 2019, 10:47:49 AM »
Curious, what OCX was causing your problem?

Offline AIR

  • BASIC Developer
  • Posts: 932
  • Coder
Re: Script BASIC - VB6 OCX Forms
« Reply #53 on: January 15, 2019, 12:31:17 PM »
It was a 3rd party OCX that would generate reports on screen and optionally in PDF format, and an OCX that handled data updates.

Interestingly, PowerBuilder (Remember that?) apps written in the late 90's still work without issues, with just a single minor custom PowerBuilder dll update.  Go figure...

Offline John

  • Forum Support / SB Dev
  • Posts: 3561
    • ScriptBasic Open Source Project
Re: Script BASIC - VB6 OCX Forms
« Reply #54 on: January 15, 2019, 12:59:56 PM »
I highly recommend Krool's CCR OCX. I haven't seen any issues with VB6 runtime on Windows 10 using Krool's OCX. I was able to get VB6 IDE running on 10 with current theming. The only issue is you need to run it as ADMIN or turn off UNC. Form what I've heard VB6 runtime will be supported until 2025.