FIX: GPF When Close Form That Contains a Single MCI Control (95500)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition for Windows 2.0
- Microsoft Visual Basic Standard Edition for Windows 3.0
- Microsoft Visual Basic Professional Edition for Windows 2.0
- Microsoft Visual Basic Professional Edition for Windows 3.0
- Microsoft Visual Basic Standard Edition for Windows 1.0
This article was previously published under Q95500 SYMPTOMS
When you have a single MCI control on a form and you set the hWndDisplay
property to the form's hWnd, you will receive a general protection (GP)
fault upon closing Form1 through the System Control of Form1. This problem
does not occur when you have a second control on Form1 in which you
set the HwndDisplay property to the hWnd of the other control.
WORKAROUND
Here's an example that shows how to work around the problem. The code
listed below places a picture box on Form1, changes the BoarderStyle to '0'
(None), and then places an MCI control on Form1:
Sub Form_Load()
MMControl1.FileName = "c:\vb\samples\mci\mcitest.mmm"
'** file in the ..\samples\mci directory of VB 2.0
MMControl1.hWndDisplay = Picture1.hWnd
'** note the picture's hWnd is used in place of the form's.
MMControl1.Command = "Open"
End Sub
Sub Form_Unload()
MMControl1.Command = "Close"
End Sub
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This problem has been corrected in Visual
Basic version 4.0.
Modification Type: | Major | Last Reviewed: | 12/12/2003 |
---|
Keywords: | kbbug kbfix KB95500 |
---|
|