Skip to content

Latest commit

 

History

History

.Net

The .Net folder

Overview
Compiling and registering
Features
Compatibility
Links and references

Overview

The .Net folder contains C# examples for creating .dll libraries that can be called from VBScript, extending the power of VBScript using the .NET Framework.

Compiling and registering

Among the options for building (compiling and registering) the class libraries are

  1. Run Setup.vbs in the project folder.
  2. Run build.vbs in the build folder.
  3. Run one or more of the .bat scripts in the build folder from an elevated command prompt.
  4. Drag one or more of the .bat scripts in the build folder onto build.vbs.
  5. Use Visual Studio (not tested).

Features

Features include the following:

  1. Documentation.
  2. Manual tests that demonstrate functionality and usage.
  3. Automated integration tests.
  4. For an example of a COM event, or callback, see NotifyIcon.cs and NotifyIcon-test.vbs.
  5. For a progress bar proof of concept, see ProgressBar.cs and ProgressBar-test.vbs.
  6. For a simple example of making a C# method available to VBScript, see EventLogger.cs.
  7. For an example of a class requiring an assembly reference, and an illustration of how to do it, see SpeechSynthesis.cs, and SpeechSynthesis.rsp.
  8. For a user-friendly file chooser dialog, see FileChooser.cs.
  9. For a user-friendly folder chooser dialog, see FolderChooser.cs and FolderChooser2.cs. These two files are adapted from stackoverflow.com posts. The exposed features of the two are identical. FolderChooser2 is a backup in case FolderChooser.cs breaks due to future changes in the private members that are invoked using Reflection.

Compatibility

Most thoroughly tested on Windows 10, the libraries are all expected to work on Windows versions as old as Vista, with the exception of SpeechSynthesis, which requires a reference probably not available on most Vista machines.

Links and References

Interoperability (C# Programming Guide)
Example COM Class
Exposing .NET components to COM
Calling back to VBScript from C#
Extracting an icon from a .dll file
Invoking the NotifyIcon context menu
Browse for a directory in C#
Show detailed browser from a property grid
Component Object Model (COM)

Compiler-supported code comments

XML Documentation Comments (C# Programming Guide)