Microsoft KB Archive/93010

From BetaArchive Wiki
Knowledge Base

Clipboard is Not Cleared on Run Restart with VB for MS-DOS

PSS ID Number: 93010

Article Last Modified on 1/8/2003

The information in this article applies to:

  • Microsoft Visual Basic for MS-DOS 1.0

This article was previously published under Q93010


In the VBDOS.EXE environment, when you place text in the Clipboard with the statement Clipboard.SETTEXT and run a program, the Clipboard is not cleared of the contents when you run the next program. The VBDOS.EXE environment does not clear the text with in the Clipboard object each time a program is run.


Microsoft has confirmed this to be a bug in the Standard and Professional Editions of Microsoft Visual Basic for MS-DOS version 1.0. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


The following steps can be used to reproduce this problem:

  1. Start VBDOS.EXE.
  2. Add the following code to the default code window:

          Clipboard.SETTEXT "This is a test"
  3. Press the F5 key to run.
  4. Add the following code to the same example program above the original code:

             IF Clipboard.GETTEXT() <> "" THEN
             PRINT Clipboard.GETTEXT()
          END IF
          Clipboard.SETEXT "This is a test"   ' Original code.
  5. Press the F5 key again to run and notice the text "This is a test" is displayed even though this second program example did not place any text on the Clipboard prior to the Clipboard.GETEXT() statement. This demonstrates that the text of the first example program was left in the Clipboard and was not cleared before running the second program.

To make sure that the Clipboard is cleared, you need to first perform a Clipboard.CLEAR statement.

Additional query words: VBmsdos BugList1.00 1.00

Keywords: KB93010
Technology: kbAudDeveloper kbVB100DOS kbVBSearch kbZNotKeyword3