Microsoft KB Archive/92460
PSS ID Number: 92460
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 Q92460
Using the function VARPTR$() to return the address of controls or their properties can yield unpredictable results, it may even cause your system to hang.
This behavior occurs because objects and their properties move around in memory. Microsoft has confirmed that this behavior is by design.
For example, the following steps will cause your system to hang:
- Start VBDOS.EXE.
- From the File menu select New Form... (Form1.FRM).
- Add a text box (Text1) to the Form (Form1).
- From the File menu select Exit, save all changes.
Add the following code to the Form_Click event procedure:
SUB Form_Click () PRINT "X" + VARPTR$(Text1.Text) END SUB
- Run the application. It hangs.
Do not use the function VARPTR$() on controls or their properties.
This information, as well as other information about Microsoft Visual Basic for MS-DOS, version 1.0, can be found in the file README.TXT that was installed along with the product.
Additional query words: VBmsdos 1.00
Technology: kbAudDeveloper kbVB100DOS kbVBSearch kbZNotKeyword3