Windows NT 4.0 source code leak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
996 B

4 years ago
  1. Global DispCalc As Object ' Calculator object, scope is global to application.
  2. Sub Main ()
  3. ' Get a number to put in calculator.
  4. x = InputBox("Enter a number to begin with.")
  5. If x = "" Then Exit Sub ' Check if canceled,
  6. Set DispCalc = CreateObject("dispcalc.application") ' Create new instance of calculator.
  7. DispCalc = x ' Assign x to DispCalc's default property.
  8. DispCalc.Display ' Display value.
  9. ' Initialize data in listbox.
  10. frmDriver.lstScript.AddItem "Cube"
  11. frmDriver.lstScript.AddItem "Count down"
  12. frmDriver.lstScript.AddItem "Decrement"
  13. frmDriver.lstScript.AddItem "Factorial"
  14. frmDriver.lstScript.AddItem "Increment"
  15. frmDriver.lstScript.AddItem "Square"
  16. frmDriver.lstScript.AddItem "Square root"
  17. frmDriver.lstScript.AddItem "Tangent"
  18. frmDriver.lstScript.AddItem "Quit"
  19. ' Display form.
  20. frmDriver.Show
  21. End Sub