Chapter 21. Adding VBScript to Your VB and .NET Applications

By now, it should be clear that VBScript is useful in many contexts within Windows. Not surprisingly, along with a variety of different technologies, Microsoft provides yet another component capable of supporting VBScript — the Script Control. This ActiveX control provides a simple way for your application written in Visual Basic (or any other language that supports ActiveX controls) to host its own scripting environment, allowing you, or your users, to customize the application. Thanks to Microsoft's attention to backward compatibility in the .NET framework, the Script Control, and by extension VBScript, can also be used to automate and extend .NET applications.

In the past, programmers had to struggle to provide customizability to their projects, or pay license fees for other products such as Microsoft's portable VB variant, Visual Basic for Applications (VBA). In 1997, Microsoft released Windows Script Interfaces (WSI) as an interface to script engines, and eventually followed up with Script Control. WSI was intended for C++ programmers, and the Script Control was tailor-made for use in a Visual Basic (VB) application — and as noted, it works great with .NET, too.

At the time of the writing of the third edition of this VBScript Programmer's Reference, Visual Basic 6 is considered "legacy" technology, and most new applications for the Windows platform are being written using the .NET framework. One may wonder why the Script ...

Get VBScript Programmer's Reference, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.