vb.net - Refreshing the PictureBox ImageLocation -
i trying refresh picturebox imagelocation. right works, images in "landscape" mode show landscape in form. can make possible using image.rotateflip() , using load beforehand.
but when try refresh picture (using timer control , function grab screenshot using adb), doesn't refresh. using breakpoints shows continues refresh. when add other items such refresh, update, image = nothing.. still not refresh or clear image.
is timer or load culprit?
delegate sub setpiccallback([text] string, byval [x] integer, byval [y] integer, [label] picturebox) public sub setpic(byval [text] string, byval [x] integer, byval [y] integer, byval [label] picturebox) ' invokerequired required compares thread id of ' calling thread thread id of creating thread. ' if these threads different, returns true. if [label] isnot nothing each ctrl picturebox in mypics if ctrl.name = [label].name if ctrl.invokerequired dim d new setpiccallback(addressof setpic) me.invoke(d, new object() {[text], [x], [y], [label]}) else ctrl .width = [x] / 4 .height = [y] / 4 .image = nothing .imagelocation = [text] '.load([text]) 'if [x] > [y] ' .image.rotateflip(rotatefliptype.rotate270flipnone) 'end if end end if end if next end if end sub
Comments
Post a Comment