Sha256: fc11a80b94ea978a067c1b256734fc297d219e4537b8159b4a6f16c8e671b591
Contents?: true
Size: 902 Bytes
Versions: 10
Compression:
Stored size: 902 Bytes
Contents
{{Libheader|Microsoft.Scripting}} {{works with|Visual Basic|VB6 Standard}} Visual Basic 6 is actually designed to create GUI applications, however with a little help from the Microsoft.Scripting Library it is fairly easy to write a simple console application. Option Explicit Private Declare Function AllocConsole Lib "kernel32.dll" () As Long Private Declare Function FreeConsole Lib "kernel32.dll" () As Long 'needs a reference set to "Microsoft Scripting Runtime" (scrrun.dll) Sub Main() Call AllocConsole Dim mFSO As Scripting.FileSystemObject Dim mStdIn As Scripting.TextStream Dim mStdOut As Scripting.TextStream Set mFSO = New Scripting.FileSystemObject Set mStdIn = mFSO.GetStandardStream(StdIn) Set mStdOut = mFSO.GetStandardStream(StdOut) mStdOut.Write "Hello world!" & vbNewLine mStdOut.Write "press enter to quit program." mStdIn.Read 1 Call FreeConsole End Sub
Version data entries
10 entries across 7 versions & 1 rubygems