2012年6月28日 星期四

Print an Excel file in VB 方法


1) Add a reference to Excel Object Library in .NET
2) Include (with Imports statments)
Imports Excel = Microsoft.Office.Interop.Excel 'Reference: Excel Object
Library" 3) Add (with Class member variable statements)
Friend WithEvents exWB As Excel.Workbook
Friend WithEvents exAPP As Excel.Application
Friend WithEvents exWS As Excel.Worksheet
4) Open the excel file (using OpenFileDialog)
exAPP.Workbooks.Open(ofd.FileName)
5) Use the PrintOut method for object you want to print.
exApp.ActiveSheet.PrintOut

2012年6月25日 星期一

vbnet 列印( dos 模式列印)

在網路看到這方法,倒也覺不錯;收錄!

2012年6月22日 星期五

用HTML5開發遊戲

請參考原站

VBNET 和 C# 比較

以前一直沒時間玩 C# , 經一些 console 小試比較後 ; 真的差很大
底下用一個簡單的例子來表示:
C#:
VBNET:

do break

2012年6月21日 星期四

foreach break

for 印出 a-y char

真是強,一直用 vbnet 都不知道 C# 竟也有此魅力!