ClipboardProxy.SetText 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
클립보드에 텍스트를 씁니다.
오버로드
| Name | Description |
|---|---|
| SetText(String) |
클립보드에 텍스트를 씁니다. |
| SetText(String, TextDataFormat) |
클립보드에 텍스트를 씁니다. |
SetText(String)
클립보드에 텍스트를 씁니다.
public:
void SetText(System::String ^ text);
public void SetText(string text);
member this.SetText : string -> unit
Public Sub SetText (text As String)
매개 변수
- text
- String
String; 쓸 텍스트입니다. 필수 사항입니다.
예외
text 은 빈 문자열입니다.
text은 Nothing입니다.
예제
다음은 클립보드에 문자열 This is a test string. 을 쓰는 예제입니다.
My.Computer.Clipboard.SetText("This is a test string.")
설명
가능한 형식은 CommaSeparatedValue, HtmlRtf 및 UnicodeText.
이전 클립보드 형식은 유지되지 않습니다.
Important
클립보드는 다른 사용자가 액세스할 수 있으므로 암호 또는 기밀 데이터와 같은 중요한 정보를 저장하는 데 사용하지 마세요.
프로젝트 유형별 가용성
| 프로젝트 형식 | 사용 가능 |
|---|---|
| Windows 애플리케이션 | Yes |
| 클래스 라이브러리 | Yes |
| 콘솔 애플리케이션 | Yes |
| Windows 컨트롤 라이브러리 | Yes |
| 웹 제어 라이브러리 | No |
| Windows 서비스 | Yes |
| 웹 사이트 | No |
추가 정보
적용 대상
SetText(String, TextDataFormat)
클립보드에 텍스트를 씁니다.
public:
void SetText(System::String ^ text, System::Windows::Forms::TextDataFormat format);
public void SetText(string text, System.Windows.Forms.TextDataFormat format);
member this.SetText : string * System.Windows.Forms.TextDataFormat -> unit
Public Sub SetText (text As String, format As TextDataFormat)
매개 변수
- text
- String
String; 쓸 텍스트입니다. 필수 사항입니다.
- format
- TextDataFormat
TextDataFormat; 텍스트를 작성할 때 사용할 형식입니다. 기본값은 UnicodeText입니다. 필수 사항입니다.
예외
text 은 빈 문자열입니다.
text은 Nothing입니다.
예제
다음은 클립보드에 문자열 This is a test string. 을 쓰는 예제입니다.
My.Computer.Clipboard.SetText("This is a test string.")
설명
가능한 형식은 CommaSeparatedValue, HtmlRtf 및 UnicodeText.
이전 클립보드 형식은 유지되지 않습니다.
Important
클립보드는 다른 사용자가 액세스할 수 있으므로 암호 또는 기밀 데이터와 같은 중요한 정보를 저장하는 데 사용하지 마세요.
프로젝트 유형별 가용성
| 프로젝트 형식 | 사용 가능 |
|---|---|
| Windows 애플리케이션 | Yes |
| 클래스 라이브러리 | Yes |
| 콘솔 애플리케이션 | Yes |
| Windows 컨트롤 라이브러리 | Yes |
| 웹 제어 라이브러리 | No |
| Windows 서비스 | Yes |
| 웹 사이트 | No |