以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助]图片旋转问题  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=60246)

--  作者:pcxjxjhkw
--  发布时间:2014/11/20 20:17:00
--  [求助]图片旋转问题
图片管理器中,用下面的代码能旋转,但没实时显示出来?

Dim zp As WinForm.PictureViewer = e.Form.Controls("PictureViewer1")
Dim str As String = zp.SelectedItem
Dim bmp As New bitmap(str)
bmp.RotateFlip(RotateFlipType.Rotate90FlipNone)
bmp.save(str)


如何刷新,实时显示旋转后的图片?

[此贴子已经被作者于2014-11-20 20:17:30编辑过]

--  作者:有点甜
--  发布时间:2014/11/20 20:31:00
--  

Dim zp As WinForm.PictureViewer = e.Form.Controls("PictureViewer1")
Dim str As String = zp.SelectedItem
Dim bmp As New bitmap(str)
bmp.RotateFlip(RotateFlipType.Rotate90FlipNone)
bmp.save(str)

Dim obj As object = e.Form.Controls("PictureViewer1").basecontrol.Controls(0)
Dim pic As Object = obj.panel1.controls("PictureSplitContainer").Panel1.controls("panel2").controls("C1PictureBox1")
pic.Image = bmp


--  作者:pcxjxjhkw
--  发布时间:2014/11/20 20:35:00
--  
甜老师,你太有才了,谢谢!