'打开
if me.openfiledialog1.showdialog=dialogresult.ok then
dim filename as string
filename=me.openfiledialog.filename
bmp=new bitmap(filename)
dim g as graphics
g=me.panel1.creategraphics
g.drawimage(bmp,new point(0,0))
g.dispose()
endif
'另存格式
if bmp is nothing
exit sub
endif
if me.savefiledialog1.showdialog=dialogresult.ok then
bmp.save(me.savefiledialog1.filename,system.drawing.imaging.imageformat.jpeg)
end if
'放大与缩小
drawimage(图像,图像大小)