Freigeben über


Visible Property

Visible Property

Gets or sets a value that indicates whether the PenInputPanel object is visible.

Declaration

[C++]

[propputref] HRESULT Visible (
    [in] VARIANT_BOOL Visible
);
[propget] HRESULT Visible (
    [out, retval] VARIANT_BOOL *Visible
);

[Microsoft® Visual Basic® 6.0]

Public Property Get Visible() as Boolean
Public Property Let Visible ( _
    isVisible as Boolean)

Property Value

VARIANT_BOOL Whether the pen input panel is visible.

This property is read/write.

Return Value

HRESULT value Description
S_OK Success. The parameter contains the currently visible panel.
E_FAIL An unspecified error occurred.

Remarks

You can set the Visible property to TRUE only when the attached control has focus. Otherwise, setting this property generates an error.

The Visible property does not apply to the Tablet PC Input Panel hover target.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example creates a PenInputPanel object, thePenInputPanel, and attaches it to an InkEdit control, InkEdit1. It then attaches a VisibleChanged event handler, thePenInputPanel_VisibleChanged. In the event handler, it adds a sentence to the content of the edit control to which the PenInputPanel is attached. The sentence is only displayed if the Visible property is set to True.

' Declare a new PenInputPanel object
Dim WithEvents thePenInputPanel As PenInputPanel

Private Sub Form_Load()
  ' Create the PenInputPanel
  Set thePenInputPanel = New PenInputPanel

  ' Attach the PenInputPanel to an InkEdit control
  thePenInputPanel.AttachedEditWindow = InkEdit1.hWnd
End Sub

Private Sub thePenInputPanel_VisibleChanged(ByVal NewVisibility As Boolean)
  ' If the panel has become visible...
  If thePenInputPanel.Visible Then
    InkEdit1.Text = "The panel is visible."
  End If
End Sub

Applies To