I hope this isnt the wrong room..
Here i go:
I figured out how to use streams but i still have a small problem
Here is the code i use (its behind a button)
It loads a bitmap puts it into a stream so i can change it.
Am i missing somthing?
Ty for your help
Here i go:
I figured out how to use streams but i still have a small problem
Here is the code i use (its behind a button)
It loads a bitmap puts it into a stream so i can change it.
Code:
Dim i As Integer
Dim mfs As FileStream
Dim myarray(265650) As Byte
Dim mms As New MemoryStream()
mfs = New FileStream("WW" & 1 & ".bmp", FileMode.Open)
mfs.Read(myarray, 1, 265650)
mfs.Close()
here i write 0 to certain the elements in the array
For i = 13879 To 50000 Step 1
myarray(i) = 0
Next
when i put the array in the mms it sets all the bytes starting from
13879 at 0 (until the end)
WHY? It should only do it from 13879 To 50000
mms.Write(myarray, 1, 265650)
pBox.Image = System.Drawing.Bitmap.FromStream(mms)
Ty for your help
Last edited by a moderator: