Public Sub imageload(ByVal index As Integer, ByRef imagedescription() As String)
        Dim da As New OleDbDataAdapter("Select Foto From Images where Photoindex = " & index & ";", Form1.baglanti)
        Dim dt As New DataTable
        Dim ms As New MemoryStream
        da.Fill(dt)
        If dt.Rows.Count > 0 Then
            Dim arrimage() As Byte = dt.Rows(0).Item(0)
            ''Form1.RichTextBox1.Text = Convert.ToBase64String(arrimage)
            ' ''Form1.RichTextBox1.Text = BitConverter.ToString(arrimage)
            'For i = 0 To arrimage.Length - 1
            '    ms.WriteByte(arrimage(i))
            'Next
            For Each ar As Byte In arrimage
                ms.WriteByte(ar)
            Next
            Dim img As Image
            img = New System.Drawing.Bitmap(ms)''Here Are Errors
            img = Image.FromStream(ms)''Here Are Errors
            Form1.imglist.Images(Form1.imglist.Images.Count) = Image.FromStream(ms)''and here
            imagedescription(imagedescription.Length) = dt.Rows(0).Item(1)
        Else
            MsgBox("record not found")
        End If
    End Sub

i was take "Parameter is not valid." error pff where is my mistake :S

Thx for Helpimg

ok thx i found somethink usable

mark as solved

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.