khumbu Posted March 15, 2003 Posted March 15, 2003 (edited) I hope this isn't 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 (it's behind a button) It loads a bitmap puts it into a stream so i can change it. 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) Am i missing somthing? Ty for your help Edited March 15, 2003 by Robby Quote
bpayne111 Posted March 17, 2003 Posted March 17, 2003 the value of those bytes are 0 by default. I'm not sure exactly what you are doing but i think that should help Quote i'm not lazy i'm just resting before i get tired.
khumbu Posted March 17, 2003 Author Posted March 17, 2003 thx for the reply but i knew that.... when i find it i will post the answer for sure Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.