Output Prime Numbers and Prime Factors
Author: Richard Deeming
Version Compatibility: Visual Basic 6
To use the code, create a form with one button (cmdCancel) with a caption of "Start", one check-box (chkNonPrime) with a caption of "Include non-primes", and one text-box (txtPrime). Paste the code into the form's module, and run. Click the "Start" button to start listing primes, tick the checkbox to include non-primes, or enter a number in the textbox to specify a starting point.
Instructions: Copy the declarations and code below and paste directly into your VB project.