PrintForm.PrintFileName 속성
캡슐화 된 포스트 스크립트 파일 및 경로를 파일 저장 됩니다 때의 파일 이름을 가져오거나 설정 합니다.는 PrintAction 속성이 PrintToFile.
네임스페이스: Microsoft.VisualBasic.PowerPacks.Printing
어셈블리: Microsoft.VisualBasic.PowerPacks.Vs(Microsoft.VisualBasic.PowerPacks.Vs.dll)
구문
‘선언
<BrowsableAttribute(True)> _
Public Property PrintFileName As String
[BrowsableAttribute(true)]
public string PrintFileName { get; set; }
[BrowsableAttribute(true)]
public:
property String^ PrintFileName {
String^ get ();
void set (String^ value);
}
[<BrowsableAttribute(true)>]
member PrintFileName : string with get, set
function get PrintFileName () : String
function set PrintFileName (value : String)
속성 값
형식: String
반환 된 String 파일 경로 이름을 포함 하는 합니다.
설명
경우는 PrintAction 속성이 PrintToFile, 폼의 이미지 (.eps,.ps 또는.ai)는 캡슐화 된 포스트 스크립트 파일에 저장 됩니다. PrintFileName 속성에는 파일의 경로를 지정 합니다.
참고
파일을 포스트 스크립트 파일로 인식 하도록 다른 응용 프로그램을 사용 하려면에서 유효한 포스트 스크립트 파일 이름 확장명 (.eps,.ps 또는.ai)를 사용 해야는 PrintFileName 속성입니다.
없으면 PrintFileName 사용자 라는 메시지가 표시 됩니다 파일 이름에 대해 런타임에 지정 됩니다.
참고 경로 또는 파일 이름 확장명을는 메시지가 표시 됩니다. 파일에 올바른 경로 및 확장 하려면 대화 상자를 직접 구현할 수 있습니다. 사용 하 여이 작업을 수행 하는 SaveFileDialog 구성 요소 및 할당 하 고 반환 값의 PrintFileName 속성 호출 하기 전에 Print 메서드.
예제
다음 예제에서는 파일 이름에 대 한 사용자 프롬프트 및 다음을 할당할 수 있는 대화 상자를 표시 하는 방법의 PrintFileName 속성입니다. 이 예제를 실행 하려면는 PrintForm PrintForm1 폼에 명명 된 구성 요소입니다.
Dim fileDialog As New Windows.Forms.SaveFileDialog
Dim fileToSave As String
fileDialog.Title = "Save to PostScript file"
fileDialog.AddExtension = True
fileDialog.Filter = "Encapsulated PostScript (*.eps)|"
fileDialog.InitialDirectory = _
My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData
fileDialog.ShowDialog()
fileToSave = fileDialog.FileName & ".eps"
PrintForm1.PrintFileName = filePath
.NET Framework 보안
- 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용를 참조하세요.
참고 항목
참조
Microsoft.VisualBasic.PowerPacks.Printing 네임스페이스
기타 리소스
방법: PrintForm 구성 요소를 사용하여 폼 인쇄(Visual Basic)
방법: 폼의 클라이언트 영역 인쇄(Visual Basic)