그림 추가하기...
' declare a DataTable to contain the program generated data
Dim dataTable As New DataTable("Cells")
' create and add a Column
Dim colWork As New DataColumn("Name", GetType(String))
dataTable.Columns.Add(colWork)
' create and add a column
colWork = New DataColumn("Picture", GetType(Byte()))
dataTable.Columns.Add(colWork)
' add some rows
Dim row As DataRow = dataTable.NewRow()
row("Name") = "me2.jpg"
Dim aBitMap As Bitmap
row("Picture") = aBitMap.FromFile(AppPath() + "..\me2.jpg")
dataTable.Rows.Add(row)
' add some rows
row = dataTable.NewRow
row("Name") = "Amanda eating mashed potatos 06.JPG"
row("Picture") = aBitMap.FromFile(AppPath() + "..\Amanda eating mashed potatos 06.JPG")
dataTable.Rows.Add(row)
Return dataTable
' declare a DataTable to contain the program generated data
Dim dataTable As New DataTable("Cells")
' create and add a Column
Dim colWork As New DataColumn("Name", GetType(String))
dataTable.Columns.Add(colWork)
' create and add a column
colWork = New DataColumn("Picture", GetType(Byte()))
dataTable.Columns.Add(colWork)
' add some rows
Dim row As DataRow = dataTable.NewRow()
row("Name") = "me2.jpg"
Dim aBitMap As Bitmap
row("Picture") = aBitMap.FromFile(AppPath() + "..\me2.jpg")
dataTable.Rows.Add(row)
' add some rows
row = dataTable.NewRow
row("Name") = "Amanda eating mashed potatos 06.JPG"
row("Picture") = aBitMap.FromFile(AppPath() + "..\Amanda eating mashed potatos 06.JPG")
dataTable.Rows.Add(row)
Return dataTable
반응형
'.NET > VB.NET' 카테고리의 다른 글
[VB.NET] 이거 아십니까? ListBox 의 MultiColumn (0) | 2009.04.30 |
---|---|
[VisualBasic.NET]Visual Basic For Very Bright Kids (0) | 2009.04.20 |
[VisualBasic.NET] Microsoft Visual Basic 2005 Power Packs 2.0 Release (0) | 2009.04.20 |
[VB.NET] DataTable 수동으로 만들기... (0) | 2009.04.02 |
[VB.NET] Linus Torvalds 말씀... (0) | 2009.04.02 |