ID Number: Q80778
1.00
WINDOWS
buglist1.00
Summary:
When Windows 3.0 is configured to use a VGA 256 color video driver,
attempting to save a graph file to disk when using the Visual Basic
Graph custom control will generate one of the following messages:
Unrecoverable Application Error
-or-
Error Creating Graph Image
Microsoft has confirmed this to be a problem in the Graph control in
Microsoft Professional Toolkit for Microsoft Visual Basic programming
system version 1.0 for Windows. We are researching this problem and
will post new information here as it becomes available.
More Information:
The following is a pseudocode example that will generate an "Error
Creating Graph Image" message.
Steps to Reproduce Problem
--------------------------
1. From the File menu in VB.EXE, choose Add File, and select the custom
control called GRAPH.VBX (this is the custom control that is shipped
with the Professional Toolkit for Visual Basic).
2. Add a graph to the form by selecting the Graph control from the
Toolbox, and either double-click the item or click the Graph
control once and draw it on the form.
3. Double-click on the form to bring up the Code window, and add the
following code:
Sub Form_Click()
Graph1.ImageFile = "testfile" 'sets the name of the file to be
'saved to disk
Graph1.DrawMode = 3 'set the DrawMode to Blit to make the graph
'file a bitmap
Graph1.DrawMode = 6 'set the DrawMode to Write
'This is a transient property value for the DrawMode property of
'the graph control. The file is written to disk.
End Sub
4. From the Run menu, choose Start to start the newly created
application.
5. Click anywhere on the form outside the graph.
An "Error Creating Graph Image" message will be displayed.
Note: When Windows 3.0 is configured to use a 16 color VGA video
driver, no error message is generated and the file will be saved to
disk with the arbitrary name TESTFILE.BMP.
Also note that setting the DrawMode property of the graph to 2 instead
of 3 will make the graph a Windows metafile. If, in the example above,
you save the graph as a metafile, it will result in an "Unrecoverable
Application Error" message.
The DrawMode properties 2 and 3 can be set either at design time or at
run time, but this has no effect on the problem. Setting the DrawMode
property to 6 will fire the event to save the image file to disk. This
image is saved either as a Windows metafile (DrawMode = 2) or as a
bitmap file (DrawMode = 3).
Additional reference words: 1.00