求助:保存PictureBoX()中的图片以及在图片上显示的标记点。(VB2008ExpressEdition)
求助:保存PictureBoX()中的图片以及在图片上显示的标记点。(VB2008ExpressEdition)
在PictureBoX框内显示了图片,并且根据坐标在其中显示了一个标记点。
想把这些保存下来(保存成word、网页格式都行)
我用了PbxN.Image.Save("mypic.JPG", System.Drawing.Imaging.ImageFormat.jpeg)
不过只能保存原有图片,标记的点没法保存阿
不知该怎么做啊?求助了... 3x
下面是我的部分程序了
Dim HMemo As New Memo
HMemo.NeedDot = True
NaOHMemo.Pos.X = (ConTNaOH - ConTNaOHmin) / ConTNaOHrange * NaOHArea1.Width + NaOHArea1.Left
NaOHMemo.Pos.Y = (TCmax1 - TC) / TCRange1 * NaOHArea1.Height + NaOHArea1.Top
LstNaOH.Add(HMemo)
PbxN_Paint(Me, Nothing)
Private Sub PbxN_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs)
Handles PbxN.Paint
Dim Drawer As Graphics = Graphics.FromHwnd(PbxN.Handle)
Dim TextFont As New System.Drawing.Font("Arial", 9, FontStyle.Bold)
For Each m As Memo In LstNaOH
If m.NeedDot Then Drawer.FillEllipse(Brushes.Red, m.Pos.X - 6, m.Pos.Y - 6, 12, 12)
Drawer.DrawString(m.Text, TextFont, Brushes.Blue, m.Pos.X + 9, m.Pos.Y + 9)
Next
LstNaOH.Clear()
End Sub
[解决办法]
搞复杂了,用CurrentX和CurrentY确定位置,在原图上print那段文字,再保存就行了,保存方法是SavePicture 语句,不是PbxN.Image.Save
[解决办法]