BUG: Visible Property of Sheridan Command Button May Not Work (150193)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 16-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 16-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 32-bit, for Windows 4.0
This article was previously published under Q150193 SYMPTOMS
The Sheridan Command button does not stay invisible although the Visible
property is set to False. This can occur if the Visible property of a
Sheridan Command button was set to False in a procedure in another form.
RESOLUTION
Use the ShowWindow API function instead of the Visible property of the
button to hide/show the button. This function takes only two parameters: a
window handle that becomes the hWnd property of the Sheridan control, and a
constant that determines how to show the window.
The declaration below can be pasted in the General...Declarations section
of the form where the routine is to hide the window:
#If Win16 Then
Private Declare Function ShowWindow Lib "User" (ByVal hWnd As Integer,
ByVal nCmdShow As Integer) As Integer
#Else
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long,
ByVal nCmdShow As Long) As Long
#EndIf
Const SW_SHOW = 5
Const SW_HIDE = 0
To hide a Sheridan Command button, issue a command similar to the
following:
ShowWindow Form1.SSCOmmand1.HWnd, SW_HIDE
and, to show a button:
ShowWindow Form1.SSCommand1.HWnd, SW_SHOW
STATUS
Microsoft has confirmed this to be an issue in the Microsoft products
listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 6/24/2004 |
---|
Keywords: | kbBug KB150193 |
---|
|