Microsoft KB Archive/81465

= HOME Key in VB.EXE Moves to Beginning of Code, Not Column 1 =

Article ID: 81465

Article Last Modified on 12/12/2003

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Standard Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 2.0 Professional Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 1.0 Standard Edition

-



This article was previously published under Q81465



SYMPTOMS
Pressing the HOME key while in the Code window in the VB.EXE environment will move the insertion point (cursor) to the beginning of the code on a line instead of to the first column of the line



STATUS
This behavior is by design even though it does differ from most other Windows-based products.



MORE INFORMATION
If the insertion point is on a line of code indented with spaces, and you press HOME, the insertion point will not be moved to the beginning of the line, but will instead move to the beginning of the code.

In many Windows-based applications, including Microsoft Word for Windows, Notepad, and Write, pressing the HOME key moves the insertion point to the beginning of the line, not to the beginning of the characters on the line.

Steps to Reproduce Behavior
 Start Visual Basic or from the File menu, choose New Project (ALT, F, N) if Visual Basic is already running. Form1 is created by default. Double-click Form1 to open the Code window.  In the Form1_Click event, press TAB to indent the next statement, and add the following code: Print &quot;Hello&quot;  Press the HOME key. The insertion point moves to the P in Print. Press the HOME key again.

You might expect the insertion point will move to the beginning of the line, but it remains on the P.

Additional query words: 2.00 3.00

Keywords: KB81465

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.