VB Cls Method on Thin and Wide Picture Control May Give UAE

ID Number: Q73375

1.00

MS-DOS

buglist1.00

Summary:

Performing a Cls method on a picture control can generate a UAE

(unrecoverable application error) message under the following

conditions:

1. AutoRedraw = TRUE for the picture control.

2. The .Width property for the picture control is very large

(approximately 20 times the width of the screen if running Windows

with a 256-color video driver, or approximately 40 times the width of

the screen if running Windows with a 16-color video driver.)

Microsoft has confirmed this to be a problem in Microsoft Visual Basic

programming system version 1.0 for Windows. Microsoft is researching

this problem and will post new information here as it becomes

available.

More Information:

Steps to Reproduce Problem

--------------------------

1. Start Windows using a 256-color driver and run Visual Basic

(VB.EXE).

2. Create a New Project and place a picture control on the form.

3. Add the following code to the Form_Click procedure:

Sub Form_Click()

Form1.ScaleMode = 3 ' PIXEL's

Picture1.AutoRedraw = -1

Picture1.Height = 34 ' 64 for 16 color video driver

For i% = 380 To 390

Picture1.Width = Picture1.Height * i%

Picture1.Cls

Debug.Print Picture1.Width

Next i%

End Sub

4. Press F5 to run the program. You will now receive a Windows

UAE message.

Note the value of Picture1.Width at the time of the UAE. It

should be approximately 20 times the width of your current screen

resolution.

Additional reference words: 1.00