VB .net - printing......

2007-02-22 6:23 pm
我想用 VB .net 列印一個report, 但佢default係 A4 Size...
請問點樣可以change size 成其他尺寸....
由於我係初學者, 可否給我詳細一點的說明 or website...

thanks & 新年快樂...

回答 (2)

2007-03-09 6:04 pm
✔ 最佳答案
I'm not so familiar with VB's syntax, but the idea is:
1. Print current directory files
2. Check the parsed integer
3. if the integer > 1 (need further depth), call PrintFilePath (path, integer-1)
This is to repeat the sub with its sub-directory, and with the depth -1
4. end function

I have tried my best to use VB syntax to modify your program. Please let me know if this failed to work.


Sub PrintFilePath(ByVal path As String, ByVal depth As Integer)

For Each FilePath As String In My.Computer.FileSyst em.GetFiles(Path)
System.Console.Write Line("The file path is: " & FilePath )
Next

if depth>1 then
depth=depth-1
For Each FolderPath As String In My.Computer.FileSystem.GetDirectories(Path)
PrintFilePath(FolderPath, depth)
Next
end if
2007-02-22 7:35 pm
You can get the page setup dialog from the tool box, then paste on the form.Then the property will show and you can change the size.
Try it.


收錄日期: 2021-04-13 15:56:58
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20070222000051KK00972

檢視 Wayback Machine 備份