Article ID: 189483
Article Last Modified on 11/18/2003
result = ShowWindow(RichTextBox1.hwnd, SW_HIDE)
Private Declare Function ShowWindow Lib "user32" _
(ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Const SW_HIDE = 0
Private Sub Form_Load()
Command1.Caption = "Span and Hide"
Command2.Caption = "Hide"
Command3.Caption = "Show"
End Sub
Private Sub Command1_Click()
Dim result As Long
Debug.Print "Before Span: Visible = " & RichTextBox1.Visible
RichTextBox1.Span ".?!:", True, True ' Select to the end
Debug.Print "After Span: Visible = " & RichTextBox1.Visible
RichTextBox1.Visible = False
'************
' Uncomment the following line to hide the Rich TextBox
' result = ShowWindow(RichTextBox1.hwnd, SW_HIDE)
'************
Debug.Print "After set Visible to False: Visible = " & _
RichTextBox1.Visible
End Sub
Private Sub Command2_Click()
RichTextBox1.Visible = False
End Sub
Private Sub Command3_Click()
RichTextBox1.Visible = True
End Sub
149463 RichTextBox Appears Even If Visible Property is False
Additional query words: kbDSupport kbDSD kbVBp kbCtrl kbvbp400bug kbVBp500bug
Keywords: kbbug kbnofix KB189483