lwchkg’s land

VB.NET Utilities for Teachers

This is a collection of VB.NET utilities I have created when I was teaching VB.NET in a secondary school. The programs include a MsgBox and a InputBox demonstration, an expression evaluator and a code snippet runner.

Download

  • Binary (Compiled with VB 2010 with .NET Framework 4)

  • Source

About the utilities

MsgBox Demo / InputBox Demo

As their name implies, they are used to demonstrate the capabilities of MsgBox and InputBox statements.

MsgBox Demo Screenshot

InputBox Demo Screenshot
Screenshots of MsgBox Demo and InputBox Demo

These two programs have two functions, namely

  • To show the required MsgBox / InputBox.
  • Generate VB.NET code for the said MsgBox / InputBox and copy the code to the clipboard.

The programs are used myself to create the teacher’s version of VB.NET worksheet or exam papers. To take high quality screenshots, I recommend Greenshot.

Expression Evaluator

This program finds out the values of multiple VB.NET expressions. Enter one expression in a line, and this program outputs the result in the corresponding line. The main use of the program is to create worksheets which ask students to evaluate VB.NET expressions. (Manual calculations are prone to errors, so automation is necessary.)

Expression Evaluator Screenshot
Screenshot of Expression Evaluator

For example, you want to calculate the answers for the following:

VB expression Result
Strings.Right("polar", 2) & Strings.Left("ease", 3) "areas"
Len("--Computer Literacy--") 21
"S." & Strings.Left("2A", 1) "S.2"
Mid("dictionary", 5, 3) "ion"
UCase(LCase("Hello!")) "HELLO!"
LCase(Trim(" Mr. Wood ")) "mr. wood"
Dim s As String = "Testing"
s = Mid(s, Len(s) - 2, 2)
"in"

The input of the program looks like this: (you need to remove s = in the last line.)

Strings.Right("polar", 2) & Strings.Left("ease", 3)
Len("--Computer Literacy--")
"S." & Strings.Left("2A", 1)
Mid("dictionary", 5, 3)
UCase(LCase("Hello!"))
LCase(Trim("   Mr. Wood "))
Dim s As String = "Testing"
Mid(s, Len(s) - 2, 2)

Snippet Runner

This program runs a VB.NET code snippet. The Console and Debug/Trace outputs are shown when you run the code snippet.

The Console input can be specified when you execute the program. The input can be dumped to the Console output, so it appears to be entered by a real user.

Subroutines (i.e. Sub and Function) are not supported.

Snippet Runner Screenshot
Screenshot of Snippet Runner

Wing-chung Leung

Updated:
Posted: