以下是引用xxfoxtable在2017/12/22 12:48:00的发言:
保存按钮保存不住位置,请老师再帮助看一下
AfterLoad事件,把代码打开
Dim p As WinForm.PictureBox = e.Form.Controls("PictureBox1")
Dim img As Image = getimage(p.ImageFile)
For Each c As Winform.Control In e.Form.Controls
'''
If Typeof c Is WinForm.label Then '判断控件是否是文本框
Dim t As WinForm.label = c '使用特定类型的变量引用控件
Dim dr As DataRow= DataTables("打印参数").Find("[项目]='"& t.text & "'")
If dr IsNot Nothing
Dim fnt As New Font(t.Font.Name, dr("字号"), t.Font.Style)
t.Font = fnt
t.Left=dr("X")*img.width/230
t.Top=dr("Y")*img.height/110
End If
End If
Next