「SyntaxHighlighter」の編集履歴(バックアップ)一覧はこちら
「SyntaxHighlighter」(2008/05/19 (月) 18:09:45) の最新版変更点
追加された行は緑色になります。
削除された行は赤色になります。
#setmenu(スタートアップメニュー)
*&this_page()
----
#setmenu(スタートアップメニュー)
*&this_page()
#include_js(http://winofsql.sakura.ne.jp/system/js/shCore.js)
#include_js(http://winofsql.sakura.ne.jp/system/js/shBrushVb.js)
#html2(){{
<textarea name="code" class="vb">
Public Class Form1
Dim obj As New Microsoft.Office.Interop.Excel.ApplicationClass
Dim books As Microsoft.Office.Interop.Excel.Workbooks
Dim book As Microsoft.Office.Interop.Excel.Workbook
' **************************************************
' 一つ一つ取得( 後でリリース用 )
' グローバルで使用するオブジェクト
' **************************************************
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
books = obj.Workbooks
book = books.Open("C:\user\book1.xls")
obj.Visible = True
End Sub
' **************************************************
' セルにデータセット
' **************************************************
Private Sub Button3_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button3.Click
book.Saved = True
obj.Quit()
'ひとつ一つリリース
'System.Runtime.InteropServices.Marshal.ReleaseComObject(book)
'System.Runtime.InteropServices.Marshal.ReleaseComObject(books)
'System.Runtime.InteropServices.Marshal.ReleaseComObject(obj)
' 一括キャンセル
obj = Nothing
GC.Collect()
End Sub
' **************************************************
' セルにデータセット
' ブロック内でオブジェクトを使用後リリースする
' **************************************************
Private Sub Button4_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button4.Click
' book.Sheets("Sheet1").Cells(10, 10) = "文字列"
Dim A, B, C As Object
A = book.Sheets
B = A("Sheet1")
C = B.Cells
C(10, 10) = "文字列"
System.Runtime.InteropServices.Marshal.ReleaseComObject(C)
System.Runtime.InteropServices.Marshal.ReleaseComObject(B)
System.Runtime.InteropServices.Marshal.ReleaseComObject(A)
End Sub
End Class
</textarea>
}}
#javascript(){{
dp.SyntaxHighlighter.ClipboardSwf = '/clipboard.swf';
dp.SyntaxHighlighter.HighlightAll('code');
}}
----
表示オプション
横に並べて表示:
変化行の前後のみ表示: