Control.Hide 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
사용자로부터 컨트롤을 숨깁니다.
public:
void Hide();
public void Hide();
member this.Hide : unit -> unit
Public Sub Hide ()
예제
다음은 단추를 클릭할 때 Ctrl 키를 누르면 단추를 숨기는 코드 예제입니다. 이 예제에서는 Button 이름을 button1 지정해야 합니다 Form.
private:
void button1_Click( Object^ sender, System::EventArgs^ /*e*/ )
{
/* If the CTRL key is pressed when the
* control is clicked, hide the control. */
if ( Control::ModifierKeys == Keys::Control )
{
(dynamic_cast<Control^>(sender))->Hide();
}
}
private void button1_Click(object sender, System.EventArgs e)
{
/* If the CTRL key is pressed when the
* control is clicked, hide the control. */
if(Control.ModifierKeys == Keys.Control)
{
((Control)sender).Hide();
}
}
Private Sub button1_Click(sender As Object, _
e As EventArgs) Handles button1.Click
' If the CTRL key is pressed when the
' control is clicked, hide the control.
If Control.ModifierKeys = Keys.Control Then
CType(sender, Control).Hide()
End If
End Sub
설명
컨트롤을 숨기는 것은 속성을 .로 설정하는 Visible 것과 false같습니다. 메서드가 Hide 호출된 후 메서드가 Visible 호출될 때까지 Show 의 값을 false 반환합니다.