Dim RS As Recordset

RS = TBOpen(strQUERY, True)

If Not RS.EOF Then
    Try
        Dim img As Object = RS.Fields("IMG").Value
        If img Is Nothing Then
   
        ElseIf IsDBNull(img) Then
            .Cells(35, 14).CellType = Nothing
        Else
            Dim strm As System.IO.Stream = New System.IO.MemoryStream(CType(img, Byte()))
            Dim img1 As Bitmap = New Bitmap(strm)
            Dim imgType As New FarPoint.Win.Spread.CellType.GeneralCellType
            imgType.BackgroundImage = New FarPoint.Win.Picture(img1, FarPoint.Win.RenderStyle.Stretch, Color.White, FarPoint.Win.HorizontalAlignment.Center, FarPoint.Win.VerticalAlignment.Center)  ' img1 
'New Picture(Image.FromStream(s))
            .Cells(35, 14).CellType = imgType
        End If
   
    Catch ex As Exception
   
    End Try

End If

밑줄그은 부분이 중요하다. 스트림으로 저장된 데이터를 이미지 타입인 비트맵으로 변환하는 과정이므로 유심히 보고 실행해 보자.

아직 버그가 많은 관계로 소스는 공개하지 못하겠네요
후후
그래도 닷넷 비베를 공부하면서 첨으로 제작하는거라 미흡한점이 많네요
그럼 ㅂㅂ2

+ Recent posts