منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : كيف نستخدم هذه الدالة
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
كود :
Private Function GetStreamAsByteArray(ByVal stream As System.IO.Stream) As Byte()

        Dim streamLength As Integer = Convert.ToInt32(stream.Length)

        Dim fileData As Byte() = New Byte(streamLength) {}

        ' Read the file into a byte array
        stream.Read(fileData, 0, streamLength)
        stream.Close()

        Return fileData

    End Function
كيف اعمل ستريم ؟؟

او كيف اقرا البايت الخاص بناتج هذا الكود
كود :
Private Function gficon(ByVal fn As FileInfo) As Bitmap
        Return Drawing.Icon.ExtractAssociatedIcon(fn.FullName).ToBitmap()
    End Function
لقد عرفت والفكرة هنا
http://vb4arb.com/vb/Thread-%D9%85%D8%B4...D9%83-2013